Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 5.0 (Lollipop) widget button's text are in ALL CAPS [duplicate]

I have a simple homescreen widget with a few buttons on it. My problem is that when the widgets are running on Lollipop the button's text are all capitalized, any previous Android version doesn't have this problem. The buttons in the layout.xml are very ordinary buttons: no styling or special sauce, just a width height and text size. The interesting thing is that any TextViews I place into the widget aren't affected by this in Lollipop, ie. it appears that only Button objects have this issue.

My AppWidgetProvider is pretty simple too: just sets the sets the text and a PendingIntent for each button.

It sounds like a global styling problem, but I can't find anything in my application's resources that would cause this. Does anyone have any input to this problem? Thanks!

like image 452
BarryBostwick Avatar asked Nov 23 '14 16:11

BarryBostwick


1 Answers

You have 2 options :

1.Use android:textAllCaps="false" in your layout-v21 (or anywhere)

  1. Programmatically change the transformation method of the button. mButton.setTransformationMethod(null);
like image 58
SagiLow Avatar answered Nov 15 '22 07:11

SagiLow