Hosni
Hosni

Reputation: 668

android: how to set overflow menu in aciton bar

i am trying to customize my action bar, and willing to put some actions into the overflow, so i used showAsAction="ifRoom" in my menu xml file.

the problem is, my action bar doesn't want to take more than 2 action(is this normal?), and don't show the overflow menu which is supposed to be included if there's not enough space in screen.

any hints or solutions please?

Thank you

Upvotes: 3

Views: 607

Answers (1)

neildeadman
neildeadman

Reputation: 3969

To get it to show on an Android 4.0 device (not 100% sure it will work on older devices, but it may with the compatability package) I also had to add android:uiOptions="splitActionBarWhenNarrow" to the AndroidManifest.xml file in either the <application /> or <activity /> section depending on the usage you want.

Also, showAsAction="ifRoom" will most likely not show them... try using showAsAction="always" to get it working at least and then try playing with them!

Hope this helps....

Upvotes: 2

Related Questions