开发者

Menu Text doesn't appear in my Android menu

The text doesn't show up in my android menu, only the icon. What can I do to fix this?

Thanks

XML menu file

<?xml version="1.0" encoding="utf-8"?>
<menu
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/context_menu_favourites"
        android:icon="@drawable/dash_fav_btn"
        android:title="Favourites" 
        android:titleCondensed="Fav"
        />
</menu>

The inflater code in my activity

@Override
public boolean onCreateOptionsMenu(Menu menu)
{
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.mainmen开发者_如何学Cu, menu);
    return true;
}


This sometimes happens when the icon is too big... as you just confirmed, that's the case. And no, if you want to use a bigger icon, you will have to implement a menu yourself.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜