Android ActionBar MenuItem LowerCase

2019-01-21 16:41发布

I want to make MenuItem title in the ActionBar to LowerCase.

my menu.xml

  <item android:id="@+id/register"
    android:title="Register"
    android:showAsAction="ifRoom|withText"/>

  <item android:id="@+id/unregister"
    android:title="Unregister"
    android:showAsAction="ifRoom|withText"/>

On the ActionBar it sees "REGISTER" and "UNREGISTER", but I want that it sees as "Register" and "Unregister".

Is it possible to make first letter upper and next letters lower at MenuItem? And how I can do that?

7条回答
时光不老,我们不散
2楼-- · 2019-01-21 17:11

Just to complete the answer, if you're using AppCompat the parent style is:

<style name="MyMenuTextAppearance" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Menu">
    <item name="android:textAllCaps">false</item>
</style>
查看更多
登录 后发表回答