Is there a way to style a TextView to uppercase all of its letters?


Question

I would like to be able to assign a xml attribute or style to a TextView that will make whatever text it has in ALL CAPITAL LETTERS.

The attributes android:inputType="textCapCharacters" and android:capitalize="characters" do nothing and look like they are for user inputed text, not a TextView.

I would like to do this so I can separate the style from the content. I know I could do this programmically but again I want keep style out of the content and the code.

1
223
3/18/2014 5:35:03 AM

Accepted Answer

I though that was a pretty reasonable request but it looks like you cant do it at this time. What a Total Failure. lol

Update

You can now use textAllCaps to force all caps.

328
5/23/2017 12:03:02 PM

What about android:textAllCaps?


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon