How to force keyboard to show only English(UK). I need this because i want to prevent user to enter other languages like Arabic, chines etc., And if user using Arabic keyboard then i need to force my app (keyboard) to use English(UK) keyboard.
kindly help me to achieve this. Thanks in advance.
I think it would be better to filter the input keys.
Even if you will be able to force English keyboard that doesn't force users to use only English letters because they can also long press a character or even have a another hardware keyboard (non-english).
So, you should listen to some events onTextChanged for example and reject all characters that you do not want to accept.
You should never force the user to do that kind of thing. If you detect a non english keyboard, just put a pop up asking them to use an english keyboard, and give them the steps to do so !
As Thomas said, you should get answers if you're sure about doing so into the post he linked
Related
Could anyone help me the way which combination of
android:inputType
can directly show the softkeyboard with numbers and different digits in it. Take a look on that screenshot:
needed softkeyboard That is what I'm looking for.
I have found combination of
android:inputType="text|textVisiblePassword"
which shows such keyboard: found softkeyboard.
But it's not what I'm looking for.
Thanks in advance.
Android TV's GBoard (Keyboard app) only supports email, password, text, and numeric input layouts. Unfortunately none of those is very close to what you're looking for. You can either implement a keyboard-like UI within your app to accomplish what you're looking for (substantial undertaking) or use the password layout and give instructions to the user, depending on your use case.
In my application I need only english keyboard. If user changes the language(hindi) in settings page(input & language)keyboard inside my application also changes to hindi language. How to restrict keyboard to English language only?
#CommonsWare's answer is correct.
However, you should probably filter the input anyways. Forcing English keyboard doesn't force user to use only English letters. User can still long press a character or have a non-english hardware keyboard.
You could listen to text change events and reject all characters that are not accepted by your DB at that point.
See question asked previously
how to force english keyboard in android EditText
How to restrict user to use other language's keyboard rather then English. In my app I don't want other languages input. App should display English keyboard. Whatever default keyboard user is using should change as English keyboard for my app. Can we do like that if yes please suggest me. Thanks in advance.
I would like to remove the "settings" and the "paste" keys in the keyboard (EditText). How can I achieve this?
Thanks in advance!
EDIT:
About possible duplicate with this thread: How to disable copy/paste from/to EditText, my question is a bit different. I am not trying to find a way to cancel the paste function in any keyboard the user may choose. In my context, the app is in kiosk mode, so user has not the privileges to change anything. And that exactly why I do not want him being able to change any keyboard config using that "setting" key in the android default keyboard...
i want to make an android app that works in background and get's what key is pressed in keyboard and throw Equivalent of it in another language,for example persian or arabic.
how can i do this?
thanks for your help.
I doubt you can write such APP, this would violate lots of security measures in android. But you can write your own custom soft keyboard:
How to develop a soft keyboard for Android?
user will have to choose your keyboard explicitly in settings. You will be able to do all the translations inside your keyboard.