Android Question Menu Overflow button not displayed on Actionbar

Inman

Well-Known Member
Licensed User
Longtime User
I tested this issue on emulators running Android 4.2.2 and on my Galaxy Note N7000 phone running AOSP based Android 4.4.2. Here is the issue.

I added 4 items to actionbar using Activity.AddMenuItem3 (with AddtoActionbar set to True). Now based on the screen size, only 2 or 3 icons should be visible on the actionbar, the rest being pushed to the overflow menu. But the problem is the overflow menu button (the one with 3 vertical dots) is not shown on the actionbar. In my Galaxy Note, 3 of the 4 icons are visible on the actionbar. If I press the physical menu button of the phone, I can see the menu come up from the bottom of the screen and that menu does have the fourth item.

But the actionbar doesn't have the overflow button to indicate there is a menu. What could be the reason? I tried android:targetSdkVersion to values from 14 to 19 but still no change.

Or is this the standard behavior from some Android version?

EDIT:

Yup, that is the standard behavior. Tested it on a friend's Moto G (which doesn't have a physical menu button) and the overflow button was there. So I guess this is how things go - if your device has a physical menu button, the overflow button will not be visible on the actionbar, otherwise it will be there.
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Yup, that is the standard behavior. Tested it on a friend's Moto G (which doesn't have a physical menu button) and the overflow button was there. So I guess this is how things go - if your device has a physical menu button, the overflow button will not be visible on the actionbar, otherwise it will be there.
This is correct.
 
Upvote 0

andrewj

Active Member
Licensed User
Longtime User
Hi,
Is there any way to detect whether the device has a physical menu key, and if so create a duplicate of the menu in the action bar?
I have a new Galaxy Note 2014, and the physical menu button is in a really silly place if you use in in portrait mode...
Thanks
Andrew
 
Upvote 0
Top