Brian
Brian

Reputation: 8085

Setting Sentence Capitalization on EditText Programmatically

Without using XML, how do I set EditText to capitalize sentences and still have predictive text working? I tried EditText.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES) and that works but it disables predictive text. How do I get predictive text and sentence capitalization both on, without using XML.

Upvotes: 2

Views: 1465

Answers (1)

Brian
Brian

Reputation: 8085

Nevermind, found it! EditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);

Upvotes: 6

Related Questions