How to capitalize the first letter of text in a TextView in an Android Application

前端 未结 11 1688
孤街浪徒
孤街浪徒 2020-12-23 15:35

I\'m not referring to textInput, either. I mean that once you have static text in a TextView (populated from a Database call to user inputted data (that may not be Capitaliz

11条回答
  •  有刺的猬
    2020-12-23 16:22

    For future visitors, you can also (best IMHO) import WordUtil from Apache and add a lot of useful methods to you app, like capitalize as shown here:

    How to capitalize the first character of each word in a string

提交回复
热议问题