I have a problem on my Action bar, I tried to setup a search view on it in order to get a a search bar expandable.
This is woking well except the fact that I had to
In the XML file, you can request a MenuItem
to appear as an action item by declaring android:showAsAction="ifRoom"
for the
element. This way, the MenuItem
appears in the ActionBar
for quick access only if there is room available. If there's not enough room, the item appears in the overflow menu.
so you answer is:
use "ifRoom" to request that an item appear in the action bar, but allow the system to move it into the overflow menu when there's not enough room.(when space is limited on smaller screens).
You can use android:showAsAction="always"
to show all menu in ActionBar
.