How to leave the first uppercase character on the keyboard?

1

How to make keyboard start with a capital letter so the user can start typing without having to tap the arrow to leave the capital letter?

I used android:inputType="textCapCharacters" but it did not work right because it writes the whole text in a line and I do not want it to happen

    
asked by anonymous 18.01.2017 / 21:07

1 answer

2

Basically there are two ways to leave the first uppercase character on the keyboard, via XML and programmatically. See:

XML

Configure your ExitText this way using textCapWords|textCapSentences :

android:inputType="textCapWords|textCapSentences"

Programmatically

EditText editor = new EditText(this); 
editor.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);

See more details in the documentation.

    
18.01.2017 / 21:37