Can I show icon in overflow menu of Android Toolbar? -


please take in consideration i'm refering toolbar widget(android l/api 21+) overflow menu , icons mean 1 :

enter image description here

something more difficult : there way icons appear on right side of text?

create menu in menu, example: main_activity_actions.xml , use code toolbar, try it:

    <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:all4one="http://schemas.android.com/apk/res-auto">     <item android:id="@+id/algo"//some id         android:icon="@drawable/kami_nomi_zu_shiru_sekai3" //add image         android:title="nose"         all4one:showasaction="always">         <menu>             <item android:id="@+id/wifi"//option display on menu                 android:icon="@drawable/nisekoi1"//this option of submenu                 android:title="@string/wifi"/>              <item android:id="@+id/datos"                 android:icon="@drawable/nisekoi6" //this 1 option                 android:title="@string/datos"/>              <item android:id="@+id/bt"                 android:icon="@drawable/sao1"                 android:title="@string/bt"/>              <item android:id="@+id/nada"                 android:icon="@drawable/nisekoi6" //the same                 android:title="@string/nada"/>         </menu>     </item> </menu> 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -