Title for icon in actionbar is not shown

2019-09-04 07:44发布

问题:

Hi I want to add a icon with title to my actionbar, but only the icon is shown. I created this item:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
    <item
        android:id="@+id/menu_save"
        android:icon="@android:drawable/ic_menu_save"
        android:title="@string/menu_save"
        android:showAsAction="ifRoom|withText"/>
</menu>

Anyone a idea? I also changed ifRoom to always but still the same problem..

回答1:

That occurs in ICS, right? This appears to be a bug in ICS

https://code.google.com/p/android/issues/detail?id=30180