Actionbar menuitem text is uppercase

14,911

Solution 1

This one helped me (I'm using AppCompat)

<item name="actionButtonStyle">@style/AppTheme.Widget.ActionButton</item>

<style name="AppTheme.Widget.ActionButton" parent="@style/Widget.AppCompat.ActionButton">
    <item name="textAllCaps">false</item>
</style>

Solution 2

You have override the theme and set your own style for the actionbar menu items

    <?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="YourTheme" parent="android:Theme.Holo">
        <item name="android:actionMenuTextAppearance">@style/LowerCaseMenuTextAppearance</item>
    </style>
    <style name="LowerCaseMenuTextAppearance" parent="android:TextAppearance.Holo.Widget.ActionBar.Menu">
        <item name="android:textAllCaps">false</item>
    </style>
</resources>

Solution 3

This post might be helpful How to style the menu items on an Android action bar

Basicly, what you will need to do is to apply a style to your menu item. In the style, add

android:capitalize="none"

I hope it helps.

Solution 4

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:textAllCaps">false</item>
</style>
Share:
14,911
Darko Petkovski
Author by

Darko Petkovski

Android programmer, who is eager to learn new things and write code

Updated on June 10, 2022

Comments

  • Darko Petkovski
    Darko Petkovski almost 2 years

    I have a menu item in my actionbar that shows only the text of the item - not the icon. And all is ok but just somehow the title of the item is going uppercase. can Can someone tell me how can I get it back to be as defined. Here is the menu xml i have:

     <?xml version="1.0" encoding="utf-8"?>
        <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" >
    
            <item
                android:id="@+id/action_download"
                android:orderInCategory="99"
                app:showAsAction="always|withText"
                android:title="Download"/>
    
        </menu>
    

    and I get an Item displayed as DOWNLOAD instead of Download