Android Tutorial Material Design 4 - Modifyable and advanced Menu

shashkiranr

Active Member
Licensed User
Longtime User
Hi @andre.astafieff

You need to go to developer options and check unknown sources that allows you to install non market apps. To activate developer options click on Build Number multiple times until you get a toast message saying developer options activated.

Also copy the error message and post it so that it will be more clear.

Hope this helps.

Regards,
SK
 

corwin42

Expert
Licensed User
Longtime User
We need more info.

How is the device connected? You only will see a log output in unfiltered logs when your device is connected via usb.

If you can't get a log output maybe you can send me the apk or better put it somewhere where i can download it from.
 
Last edited:

corwin42

Expert
Licensed User
Longtime User
Updated the example in the first post. It now includes the missing resources folder. Please download it again.

Didn't B4A report an error about the missing folder? The #AdditionalRes: ..\resources line should give an error.
 

corwin42

Expert
Licensed User
Longtime User
Thanks !!!

I am connected via wifi for B4A-Bridge.

To see the error stack for this issue you must connect your device with USB and then it will show up in the unfiltered logs. If you can't connect a real device with USB you can also try the Android emulator or better Genymotion.
 

andre.astafieff

Member
Licensed User
Longtime User


Hello @Peter Simpson

Could you tell me how prepared the side menu (left)?
 

Peter Simpson

Expert
Licensed User
Longtime User

ArminKH

Well-Known Member
I will probably change the app to utilise this library instead
yes thats very useful lib and we can create a side menu just in 5 6 line,but thats not customizable such as font of items ,item gravity,icon gravity, etc...
totally thats just is suitable for english language drawers
 

ArminKH

Well-Known Member
You can create a sliding menu yourself in just five lines, okay this I have to see, show me that code @arminkh...
B4X:
Sub CreateMainLayout
    Dim MDB As MSMaterialDrawerBuilder,MD As MSMaterialDrawer
        MDB.Initialize("MD")
        MDB.AddPrimaryDrawerItem  ("Home"  , Null ,Null ,"+99" ,True,1, "")
        MDB.AddSecondaryDrawerItem("Setting" ,Null ,Null ,""    ,True ,2)
        MD = MDB.Build   
End Sub
this is simplest code which we can use for creating drawer just in 5 line
@Peter Simpson
 

Peter Simpson

Expert
Licensed User
Longtime User
@arminkh you said that you could write one in 5 lines, that is not writing one in 5 lines, that is utilising a library, not you writing one. Anyway this is the wrong thead to have this discussion...
 
Last edited:

ArminKH

Well-Known Member
@arminkh you said that you could write one in 5 lines, that is not writing one in 5 lines, that is utilising a library, not you writing one. Anyway this is the wrong thead to have this discussion...
Oooops!!!
Excuse me if my bad english makes misunderstanding !!!
But i said we can create a drawer just with 5 6 line !!!!
 

andre.astafieff

Member
Licensed User
Longtime User
Hi @corwin42



I'm finally getting to integrate with MSMaterialDrawer (https://www.b4x.com/android/forum/threads/msmaterialdrawer.53883/#content), but now I have one doubt beginner.

When you open the application realized that loads the main Activity with the member sign that code loads the layout "main" later other content is uploaded to a Panel as if we were working with an iFrame in html.

Now I'm adapting an application that was already in development operating with Activitys and conjugated layouts (each layout had its codification in a module Activity type) how I could adapt my code to when I load the layouts in the panel can operate with the logic part?
 

ArminKH

Well-Known Member
hi @corwin42
Is there any way to change menu indicator to White with AcToolbarLight?
i don't want to use AcTollbarDark at all because then my OverFlow menu items background color be dark and thats seem not good for my app
thank u
 

fishwolf

Well-Known Member
Licensed User
Longtime User
If i use the example on page 1, i get this error to start

08-17 11:53:03.675: I/B4A(15274): ~i:** Activity (main) Create, isFirst = true **
08-17 11:53:03.725: I/B4A(15274): ~e:java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

how to i can fix?
 

corwin42

Expert
Licensed User
Longtime User
hi @corwin42
Is there any way to change menu indicator to White with AcToolbarLight?
i don't want to use AcTollbarDark at all because then my OverFlow menu items background color be dark and thats seem not good for my app
thank u

I never tried it but you may change it in the theme file.

A better solution is to set the Theme for the OverFlow menu:

B4X:
ActionBar.PopupTheme = ActionBar.THEME_DARK


Can you provide more info. What device are you trying it on (Android version)? Can you post the complete error stack trace?
 

Inman

Well-Known Member
Licensed User
Longtime User
Is it possible to create a popup menu and display it when a button on the activity is pressed? And if possible display the menu on top of the button so that the context will be clear for the user.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…