Android Question 3 dot menu problem on actionbar with sliding pages

M. Giray Ozkan

Member
Licensed User
Longtime User
Dear Erel,

I have trouble adding menu items to actionbar. I'm using addmenuItem3 but 3 dot menu icon does not appear on top right corner.

I've also tried to standart holo theme with no luck.

B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")


B4X:
AddManifestText(

<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="17"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@style/Theme.MyCustomTheme")
SetActivityAttribute(addReminderActivity, android:windowSoftInputMode, adjustResize|stateHidden)
AddPermission(android.permission.VIBRATE)


B4X:
Activity.AddMenuItem3("", "mnuUser", LoadBitmap(File.DirAssets, "ic_action_user.png"), True)
Activity.AddMenuItem3("Menu Option 1", "mnuOpt1",Null,False)
Activity.AddMenuItem3("Menu Option 2", "mnuOpt2",Null,False)
Activity.AddMenuItem3("Menu Option 3", "mnuOpt3",Null,False)
Activity.AddMenuItem3("Menu Option 4", "mnuOpt4",Null,False)

by the way, I'm using LG-G2 phone with Android 4.2.2
 

DonManfred

Expert
Licensed User
Longtime User
If i remember correctly the 3-point menu in the top only appears when you are targetting the 2.x API of android... On newer Androidversions this is gone...
Say. In the target-api-level you refer to in manifesteditor...
 
Upvote 0

M. Giray Ozkan

Member
Licensed User
Longtime User
Dear @Erel

please find as attached. I changed only a few lines of your original ActionBar project.
 

Attachments

  • ActionBar_Giray.zip
    14.2 KB · Views: 391
Upvote 0

M. Giray Ozkan

Member
Licensed User
Longtime User
Dear @Erel

as I mentioned before, I'm using LG-G2 (Android 4.2.2) and this device has no physical menu button.

Ok, never mind :)

So, I've another question about that. When I tried to call Activity.OpenMenu, popup menu shown at bottom-left area. How can I provide show that menu in the top-right corner (right below 3 dot menu icon) ?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

achtrade

Active Member
Licensed User
Longtime User
Any alternative for that 3 dot menu using target >= 11 ?

No more 3-dot Menu with target >= 14 ??
 
Last edited:
Upvote 0

achtrade

Active Member
Licensed User
Longtime User
No problem at all, just I wanted to use the standard 3-dot menu no matter what kind of phone is.

Thanks.
 
Upvote 0
Top