Android Studio - 带大写锁定每个新单词的键盘

Android Studio - keyboard with caps lock every new word

我想将我的键盘设置为每个新单词都会锁定第一个字母的键盘。

喜欢: This Is An Example

而不是:

This is an example

如果您使用 EditText 字段,您只需添加:

<EditText
    ...
    android:inputType="textCapWords"
    ....
/>

在 XML 文件中。

或以编程方式使用:

editText.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS)