Skip to content Skip to sidebar Skip to footer

Item Title Not Displayed In Portrait With Show_as_action_with_text

In my activity, I have an action mode with a single item which has a title and an icon. I want both the title and the icon to be displayed, so I use SHOW_AS_ACTION_WITH_TEXT and SH

Solution 1:

Does anyone know what I could do to fix it ?

I doubt that you can. "Always" and "with text" are requests, not commands. The framework does not always honor either of them.

Solution 2:

Instead of adding this menu item via code try to use this attribute:

android:showAsAction="always|withText"

and add it to the item in the menu.xml

Post a Comment for "Item Title Not Displayed In Portrait With Show_as_action_with_text"