Skip to content Skip to sidebar Skip to footer

Android:option Menu Appearance And Icon Not Getting Displayed

I am facing a few problems with the android option menu. Here is my code: Inside res folder, i created a menu folder containing menu.xml file with this below code:

Solution 1:

Change the API version from 15 to 11 or lower . Also , the image is not getting displayed because you might have selected an image too large for a certain drawable folder .

drawable-hdpi with 72 by 72 pixel icons

drawable-mdpi with 48 by 48 pixel icons

and

drawable-ldpi with 36 by 36 pixel icons

Solution 2:

Question 1:

in the AndroidManifest.xml, find something like the following: " uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" " remove the android:targetSdkVersion="16"

Question 2:

my menu.xml file like this:

<item android:id="@+id/about"
      android:icon="@drawable/about"
      android:title="@string/about"
      android:showAsAction="ifRoom|withText" /> 

it works, show the image icon, you can try it.

Post a Comment for "Android:option Menu Appearance And Icon Not Getting Displayed"