I have an edit text box. When the user clicks on it by default, it displays small letters on the virtual keyboard.
I want to display the first letters by default and the rest on the keyboard.
How can I do that?
Try adding android:capitalize="sentences" to the EditText definition in your Layout file. This should be capitalize first character of the sentence. If you want to start each word with a capital letter, use the words.
android:capitalize="sentences"
EditText
Layout
capitalize
You can learn more about this in the API .
android:capitalize deprecated. So please use: android:inputType
android:capitalize
android:inputType
android:inputType="textCapSentences"
To capture each EditText character, use this property.
android:capitalize="characters"
I used the textCapCharacters attribute below in my EditText to enable textCapCharacters locking on the virtual keyboard, and it worked.
textCapCharacters
android:inputType="textCapCharacters"
To use all keyboard characters, use this in edittext in xml:
edittext
To use the first character of each sentence, use this: