Question

In my app, I have two menu items, one a settings icon and the other a string of text "Quick Sites". This "Quick Sites" text takes up alot of space on the action bar. This isn't a problem on tablets but on phones with smaller, lower res displays, it takes up alot of room. It really takes away from the main part of the app. Unlike what other people have asked about this on here, I don't want to force the overflow icon to appear, I want to force the "Quick Sites" item into the overflow so that it doesn't take up some much room on certain phones. Is this possible since I only have two menu items? I've tried setting it to ifRoom but it still shows it, no matter how low res the screen is.

Was it helpful?

Solution

Use never to force the item into the overflow menu:

android:showAsAction="never"

Aynway, you can set an icon to the menu item and use ifRoom|withText. This should result in showing only the icon if there is space, but showing the text + icon on large displays.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top