Android soft keyboard - disable certain keys

旧巷老猫 提交于 2019-12-10 10:53:14

问题


I am looking for a way to use the built-in soft keyboard and disable certain key. For example, if the User is not supposed to use the letter 'f' (because in the list, that letter is not present), the key should be grayed out.

Imagine that a User can type a text into a textbox for choosing from a list.

The list contains:

Abc Bcd Bed

If the User inputs:

-A

Then he will only be able to click on 'B' and then only to 'C'.

If the User inputs:

-B

At first he will be able to choose 'C' or 'E' and then according to the selection.

Is it possible without the need to create the keyboard from scratch? If not, is there an easy way to make one? (I have found the one at developers.google.com)

来源:https://stackoverflow.com/questions/9454368/android-soft-keyboard-disable-certain-keys

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