开发者

Android Menu Icon with Title : Title doesn't display

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/men开发者_高级运维u_help" />
</menu>

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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜