Android - is it possible to hide certain characters from the soft keyboard?

家住魔仙堡 提交于 2020-01-06 06:46:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!