I have a question regarding sherlock actionbar. In portrait mode, ICS doesn’t display text next to menu items in the action bar, no matter how much space is available. Rotating to landscape mode yields the expected behavior (icons + text). If I remove the icon from the menu item, it displays the text (only) in portrait mode. Is it possible to display text + icon in portrait mode if space available? I use the code below to add menu items into actionbar.
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
menu.add(Menu.NONE, 1, 0, "Post").setTitle("Post").setIcon(android.R.drawable.ic_menu_save).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return true;
}
Thanks in advance.
From https://github.com/JakeWharton/ActionBarSherlock/issues/400:
So, no, its not possible on smaller screens even if there is room in the action bar. As you’ve pointed out though, you can drop the icon to force the text to appear.