Forced English keyboard on Android

How to make the keyboard display only English (UK). I need this because I want the user to not enter other languages ​​such as Arabic, chines, etc. And if the user is using an Arabic keyboard, I need to get my application (keyboard) to use the English (British) keyboard.

kindly help me achieve this. Thanks in advance.

+4
source share
2 answers

I think it would be better to filter out the input keys. Even if you can force the English keyboard to not force users to use only English letters, because they can also press a character for a long time or even have a different hardware keyboard (not English).

So, you should listen to a few events onTextChanged, for example, and reject all characters that you do not want to accept.

+4
source

You should never force the user to do such things. If you find a non-English keyboard, just place a popup asking you to use the English keyboard and give them steps to do this! As Thomas said, you should get answers if you are sure that you are doing this in the message that he linked

+1
source

Source: https://habr.com/ru/post/1611287/


All Articles