<menu
    xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/add_birthday_reminder"
        android:alphabeticShortcut="r"
        android:title="@string/birthday_add"
        android:icon="@*android:drawable/ic_suggestions_add"
        android:showAsAction="withText|always" />
</menu>
如下图右上角的加号。
若没有icon就能显示title指定的字符串,若有icon,横屏能全部显示,但竖屏只能显示icon不显示文字,能不能
竖屏时同时显示?

解决方案 »

  1.   

    frameworks\base\core\res\res\values\Config.xml<!-- Whether action menu items should be displayed in ALLCAPS or not.
             Defaults to true. If this is not appropriate for specific locales
             it should be disabled in that locale's resources. -->
    <bool name="config_actionMenuItemAllCaps">true</bool>
      

  2.   

    错了,是这个
    <!-- Whether action menu items should obey the "withText" showAsAction
             flag. This may be set to false for situations where space is
             extremely limited. -->
    <bool name="config_allowActionMenuItemTextWithIcon">true</bool>