Pergunta

I use this code in my menu.xml:

<item android:id="@+id/physics"
        android:icon="@drawable/ic_action_***"
        android:title="@string/physics"
        android:orderInCategory="2"
        android:showAsAction="always"/>

Now my Icons aren't very much saying about the button they stand for. So I wan't display them AND the title. After long google research I found this on @stackoverflow: Android Menu Icon with Title : Title doesn't display But it's about the icons. I downloaded my icons already in the right size and put them in the right folder.

And I don't have problems with my icons, they are showing great, but when you see a line chart, you don't automatically think of physics, do you?

Any idea, how to display both? I also added a sting, it doesn't show up (is it even possible?)

Foi útil?

Solução

Any idea, how to display both?

Replace:

android:showAsAction="always"

with:

android:showAsAction="always|withText"
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top