Using activity add menu to create menu doesn't work on all devices.
My Asus Transformer tablet, a clients Motorola Xoom running Android 4.1.2
Pressing the physical Menu button won't raise the menu.
I created a button with Activity.OpenMenu in the onlick event but still no menu.
It does work on my Galaxy S2 and most other devices.
Hello Erel,
I create the menu in Activity_Create as so:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim lc As LicenseChecker
Dim p As PhoneId
Dim ph As Phone
Activity.LoadLayout("Main")
Activity.AddMenuItem("About","About")
Activity.AddMenuItem("Settings", "Settings")
Activity.AddMenuItem("DB Updates?", "UpdateDB")
I have sold 60 odd apps and just a few report this problem of not being able to bring up the menu so I created a button to do so with the following but on some devices like my tablet - no menu:
Tried removing license nothing still....
Fair comment re variable names and taken on board
Just as a test, if you have not done so already, you can edit the Manifest and try:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8"/>
This makes the menu work on my ASUS. Just for testing. The other option is do what I did and use the SlideMenu class.
Yes, I know, without set the TargetSDK, but it had other "negative" consequences (which at the moment can not remember) so I liked your solution:
SetApplicationAttribute(android:theme, "@android:style/Theme")
I'm not aware of any negative consequences related to setting the target version to 4 (if you want to use the old style). However if you want to further discuss it please start a new thread.