I have a button which when clicked jumbles a word and puts the word into a textview.
I want the textview to only display capital letters.
How can I do this?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you mean you want the TextView to capitalize everything that is put into it, then you can set the capitalize XML attribute on the TextView.
If you mean you only want capital letters to show up ex:
“Hi There!” –> “HT”
Then you need a little bit of Java code (from memory, untested):
You can then set the text in the TextView: