Android Question Activity.OpenMenu and Android 5.0.2

mauro vicamini

Active Member
Licensed User
Longtime User
Hi Everyone!
I've a problem: I've an application that open a menu clicking on an image calling Activity.OpenMenu. Everything works great on Android prior 5.0 , on my Android 5.0.2 (Samsung Galaxy Tab A) it doesn't appear when I click on the image.
Is it a bug or do I have to consider something more (maybe something in manifest or some other option)?

Thanks.
 

mauro vicamini

Active Member
Licensed User
Longtime User
yes it works! So why in my project doesn't work? I do Activity.AddMenuItem like you do in Activity_Create and I call Activity.OpenMenu in image_click event, nothing more. What could it be the problem?
 
Upvote 0

mauro vicamini

Active Member
Licensed User
Longtime User
I think to have found the problem: the diference between your example and my application is that in may application the Activity is set with #IncludeTitle: false. If i do the same with your example it doesn't works, exactly like my app. But calling Activity.OpenMenu in an Activity with no title works on previous Android versions, also in devices without hardware menu button.
 
Upvote 0

mauro vicamini

Active Member
Licensed User
Longtime User
You are right Rick! It's the same I've experienced and made me open this thread.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've used this manifest:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
  android:normalScreens="true"
  android:smallScreens="true"
  android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")

It will work on all devices running Android 2.0+.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…