Android Question PreferenceActivity/GoogleMaps menu button doesn't show

LA3QMA

Member
Licensed User
Longtime User
"The menu button doesn't show"

using "targetSdkVersion="11" because i'm using the GoogleMaps library.

Is there a workaround for this? Or something i can do so that older devices do not install and crash? Or is it possible to include the GoogleMaps library and only execute if android 3+ are in use?
 

LA3QMA

Member
Licensed User
Longtime User
Which menu button? PreferenceActivity doesn't create any special menu button.

B4X:
Activity_KeyPress (KeyCode as Int, y as String)
If KeyCode = KeyCode.KEYCODE_MENU then
 StartActivity(prefsscreen.CreateIntent)
........

Its there if i reduce
android:minSdkVersion="11" to i.e
android:minSdkVersion="8"


But then this is going to be a problem with the GoogleMap
 
Upvote 0

LA3QMA

Member
Licensed User
Longtime User
On Android 4+ devices the default indication for the menu are the three dots at the top right corner (on devices without a physical menu button).

Yes but this indicator does not show when changing the sdkversion in the XML.
 
Upvote 0

LA3QMA

Member
Licensed User
Longtime User
The 3 dots will show only if there are any menu items (Android 3+) older versions displayed the button regardless but the menu button has been deprecated by Google.

Ok. It's working if i "downgrade" the sdkversion. But if it's deprecated are there any other options that are compatible for both android 3+ and 3- ?
I need a menu so that the user can make some changes.
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
Like I mentioned before, if there are no menu items the menu button won't show up, so, you will have to add at least one, or instead of the menu use an ActionBar which the recommended way.
 
Upvote 0

LA3QMA

Member
Licensed User
Longtime User
Like I mentioned before, if there are no menu items the menu button won't show up, so, you will have to add at least one, or instead of the menu use an ActionBar which the recommended way.

There are three menu items. Anyhow i'll check the Actionbar you mentioned.

Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…