5

Here is my XML

<?xml version="1.0" encoding="UTF-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
 <item android:id="@+id/refresh" android:title="Home"
  android:icon="@drawable/menu_home" />
 <item android:id="@+id/search" android:title="Search"
  android:icon="@drawable/menu_search" />
 <item android:id="@+id/help" android:title="Help" android:icon="@drawable/menu_help" />
</menu>

Icon is getting displayed but title doesn't. Please advise.

4
  • Odd, what size, in pixels, are your icons? I wonder if they are too big and pushing the text off of the menu. Dec 9, 2010 at 3:52
  • looks like i need 48 * 48 . Let me try that.
    – WebThinker
    Dec 9, 2010 at 3:56
  • That was it. @Andrew thanks for the hint.
    – WebThinker
    Dec 9, 2010 at 4:00
  • Thanks for having this problem, because it just happened to me, and resizing fixed it. =) Dec 28, 2010 at 21:57

2 Answers 2

7

I'll post this as an answer then...

The size of menu pixes can be too large (such as 72x72). Make sure you use the proper size icons for your current display.

0

I had the same problem, but my menu icon size was 32x32. And still displayed over the text. So, I played a little with the sizes, and set it to about 47x47 and it finally worked.

So, if this happens, try to play with the image sizes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.