Android 5.0 widget button text (Lollipop) is in ALL CAPS

I have a simple desktop widget with a few buttons on it. My problem is that when widgets work on Lollipop, the button text is completely capitalized, any previous version of Android does not have this problem. The buttons in layout.xml are very common buttons: no style or special sauce, just the width and size of the font. Interestingly, all the text objects that I put in the widget are not affected by this in Lollipop, i.e. It seems that the problem is only with Button.

My AppWidgetProvider is also quite simple: it simply sets up sets for text and a PendingIntent for each button.

This sounds like a global-style issue, but I cannot find anything in my application resources that could cause this. Does anyone have any contribution to this problem? Thanks!

+5
source share
1 answer

You have 2 options:

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

  1. Programmatically change the button conversion method. mButton.setTransformationMethod (zero);
+9
source

Source: https://habr.com/ru/post/986747/


All Articles