2

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Brian
  • 7,955
  • 16
  • 66
  • 107

1 Answers1

6

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

Brian
  • 7,955
  • 16
  • 66
  • 107