user1128578
user1128578

Reputation: 13

Android Action Bar Tabs and Menu Items

I am using a action bar. I have menu items on that. I have set the property on it as

android:showAsAction="ifRoom|withText"

So it's working in Potrait and landscape really well. On one page I have Tabs, it's not recognizing tabs and overwriting the tabs. What I would like to do is, in Potarit just show tabs and all menu in drop down. In Landscape show tabs and as many menu items possible on action bar.

Thanks,

Upvotes: 0

Views: 509

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006674

Have a res/menu/options.xml and a res/values-land/options.xml to distinguish the cases. Or, if the rule really is not portrait vs. landscape but a minimum screen width, use res/menu/options.xml and res/menu-wNNNdp/options.xml, where NNN is the minimum width in dp for when you want to use some other approach for your menu.

Upvotes: 2

Related Questions