Random78952
Random78952

Reputation: 1640

How can i add custom option menu icon Android

i want to add customs icons to my option menu, like that :

enter image description here

How can i do that with custom icons in my menu.xml ?

Or if you know the list of defaults icons, i am interested by that...

Here is my actual menu.xml code :

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/menu_settings"
        android:title="@string/menu_settings"
        android:orderInCategory="100"
        android:showAsAction="never" >
    </item>
    <item android:id="@+id/item1" android:title="Accueil" android:titleCondensed="Accueil" android:icon="@android:drawable/ic_menu_home"></item>
</menu>

Thanks !

Upvotes: 0

Views: 2931

Answers (1)

JPeace
JPeace

Reputation: 86

Inside of the item tag, use android:icon="@drawable/your_icon". That should work.

Upvotes: 1

Related Questions