First letter capitalization for EditText

后端 未结 17 2068
傲寒
傲寒 2020-11-28 01:11

I\'m working on a little personal todo list app and so far everything has been working quite well. There is one little quirk I\'d like to figure out. Whenever I go to add a

17条回答
  •  不知归路
    2020-11-28 02:07

    For Capitalisation in EditText you can choose the below two input types:

    1. android:inputType="textCapSentences"
    2. android:inputType="textCapWords"

    textCapSentences
    This will let the first letter of the first word as Capital in every sentence.

    textCapWords This will let the first letter of every word as Capital.

    If you want both the attributes just use | sign with both the attributes

    android:inputType="textCapSentences|textCapWords"
    

提交回复
热议问题