Android的softkeypad控制大写锁定 [英] Control Caps-Lock of android softkeypad
问题描述
我有一个的EditText
。该softkeypad应该弹出作为国家帽子,当我想编辑的EDITTEXT。有没有办法做到这一点?
I have an EditText
. The softkeypad should popup as "Caps on" state, when I want to edit the editText. Is there any way to do this ?
推荐答案
看的 TextView的类inputType下财产。根据什么你到底需要,<一个href=\"http://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS\"相对=nofollow> TYPE_TEXT_FLAG_CAP_CHARACTERS ,<一个href=\"http://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_SENTENCES\"相对=nofollow> TYPE_TEXT_FLAG_CAP_SENTENCES 或 TYPE_TEXT_FLAG_CAP_WORDS 应该做的工作。您可以设置它无论是在布局文件,或通过code。
Look at the InputType property of the TextView class. Depending on what you exactly need, TYPE_TEXT_FLAG_CAP_CHARACTERS, TYPE_TEXT_FLAG_CAP_SENTENCES or TYPE_TEXT_FLAG_CAP_WORDS should do the job. You can set it either in the layout file or via code.
这篇关于Android的softkeypad控制大写锁定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!