The icon do not display in menu item

59 views Asked by At

I have a contextmenu with two items, and each item has its icon. However the icons are not being displayed, I am using android level 15.

<?xml version="1.0" encoding="utf-8" ?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
  <item android:id="@+id/new_game"
      android:title="item1"
      android:icon="@drawable/icon_menu_save"
      android:showAsAction="always|withText"/>

  <item android:id="@+id/help"
    android:title="item2" 
    android:icon="@drawable/icon_menu_close"/>

</menu>
1

There are 1 answers

0
SubinM On BEST ANSWER

In android contextmenu doesn't support icons by default. You can use the following library if you want to do so.

https://code.google.com/p/android-icon-context-menu/