0

I have given my menu items with images.In android3.1 it displays menu with images but when i try the same coding in 4.2 the images are not displaying.Can anyone help me. Thanks in advance

  <?xml version="1.0" encoding="utf-8"?>
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_close"
      android:icon="@drawable/icon_preferences"
      android:title="close" />
<item android:id="@+id/menu_signout"
      android:icon="@drawable/icon_bookmark"
      android:title="Signout" />    
<item android:id="@+id/menu_cpc"
      android:icon="@drawable/icon_save"
      android:title="Change PIN" />
<item android:id="@+id/menu_cpw"
      android:icon="@drawable/icon_search"
      android:title="change password" />
<item android:id="@+id/menu_sync"
      android:icon="@drawable/icon_search"
      android:title="Synchronize" /></menu>
Ramya Selvarani
  • 499
  • 1
  • 9
  • 23
  • images are probably too large for the menu. Make sure you are using a correct image size ldpi 32 x 32 px mdpi: 36 x 36 px hdpi: 48 x 48 px xhdpi: 64 x 64 px – Digit Jan 08 '14 at 11:28

1 Answers1

-1

Google has removed it in the later versions.Icons no longer exist in Menus

This blog says more about the same. So you should start using ActionBar instead.

Seshu Vinay
  • 13,560
  • 9
  • 60
  • 109