Skip to content Skip to sidebar Skip to footer

Lollipop Capitalizes Buttons' Text In My App

I am expreiencing a strange problem with my application. When I am testing it on a real device (with Android 4.4.4) all my Buttons' text fields look how I wanted (lower case letter

Solution 1:

Starting with Android 5.0, Buttons automatically have their text capitalized. This is in accordance with the new material design guidelines, which you can find here.

If you want to force your buttons to display the text as it does in previous platform versions, you can set android:textAllCaps="false" in your XML. However, I would recommend against this. Users expect their apps to look material in Android Lollipop, and that means they expect your buttons to display text in all capital letters (even if your app displays the text differently in previous platform versions).

Solution 2:

Actually this is possible:

new AlertDialog.Builder(context, R.style.StackedAlertDialogStyle)

StackedAlertDialogStyle:

<stylename="StackedAlertDialogStyle"parent="Theme.AppCompat.Light.Dialog.Alert"><itemname="buttonBarButtonStyle">@style/StackedButtonBarButtonStyle</item></style><stylename="StackedButtonBarButtonStyle"parent="Widget.AppCompat.Button.ButtonBar.AlertDialog"><itemname="android:layout_gravity">right</item><itemname="android:textAllCaps">false</item></style>

Now you can see the buttons not in capital.

Post a Comment for "Lollipop Capitalizes Buttons' Text In My App"