问题
Is it possible to hide (or disable) certain characters on the soft keyboard? It's been asked before: Android soft keyboard - disable certain keys but no answer.
(I'd rather hide than disable keys but would go for either) Thanks!
回答1:
Is it possible to hide (or disable) certain characters on the soft keyboard?
Only if you create your own input method editor (a.k.a., soft keyboard) and get the user to switch to it.
Attributes like android:inputType
are hints that some input method editors will honor and may control what characters are available. However, there is no guarantee that any given input method editor will honor it and what characters it will elect to include and exclude.
回答2:
It can only be done if you create a 3rd party keyboard and the user selects it as the keyboard to be used on their device. I don't think you can customize the keyboard for within your own application very easily.
来源:https://stackoverflow.com/questions/10536839/android-is-it-possible-to-hide-certain-characters-from-the-soft-keyboard