Android keyboard input weird behaviour - android

I notice Android devices' default keyboard behave in a different ways, but I have 1 particular behaviour that I am unsure what it is and how to configure the keyboards settings. See the info below.
When Click in any edittext to get focus, the Keyboard shows up
When I type "Hello", the edittext don't get filled with the text immediately. I need to click the suggested "Hello" and then the text shows up in the edittext
Questions:
What are the settings to make the keyboard behave this way?
Is this behaviour the same on all Android keyboards? (I think no but, I
don't find any supporting references)
Do you guys know any 3rd party keyboard app that has this feature?
How to know if the user is using this type of keyboard?
To detect user interaction I use a combination of (1)onUserInteraction() and a (2)custom TextWatcher implementation. Both are tested and working so I didn't add the source codes. I mentioned the 2 above because those kind of keyboards with that behavior textchanges cannot be detected.
From the screenshots above "Hello" will only show when you click the green "Hello" in the left screenshot.

Related

Disable speech to text button (Micro phone) on soft input keyboard in android programmatically

Thanks in advance for the help.
I am developing an android application for research purposes and need to disable the speech to text button on the soft input keyboard. The reason for this is due to concurrency issues that arise since the application I am developing uses the microphone. I understand that for a general application disabling keys is generally seen as impossible (since users may change default keyboards). I know for a fact that the default keyboard will be used.
With this in mind is it possible to disable certain keys? I believe that at the least I should be able to specify the input type such that the microphone button is hidden. I say this because if I disable speech to text in the settings (not programmatically, but manually as a user) the microphone icon is removed from the keyboard. I'm open to any possible solution (with the exception of not using the default keyboard) as this application will not appear on the play store.
You can't force the user input through anything other than pre-defined keyboards that already exist in the user's device.
The only way you could get around this is by programming your own custom, on-the-fly keyboard, and that is a very bad idea.
Just disable voice input programmatically by using XML declarations in the EditText you're looking at. You can do this with the attribute:
android:privateImeOptions="nm" // nm stands for No Microphone.
If you want to set it programmatically you can try this::
// deprecated i guess
edt_txt.setPrivateImeOptions("nm");
// this one is new but it works only with Google Keyboard.
edt_txt.setPrivateImeOptions("com.google.android.inputmethod.latin.noMicrophoneKey");
You can combine values in PrivateImeOptions parameter in CVS form so best option is to use:
edt_txt.setPrivateImeOptions("nm,com.google.android.inputmethod.latin.noMicrophoneKey");
Take a look through here and see if you can find what you're looking for.
More info about Google Keyboard here -> look for method setOptions
To disable microphone button on multiple keyboard. Use property
android:privateImeOptions="nm"
But it will not work for Gboard(google native keyboard)
To disable on microphone on Gboard use
android:privateImeOptions="nm"
editText.setImeOptions(IME_FLAG_NO_PERSONALIZED_LEARNING)
Just use this in your editText on the layout file:
android:imeOptions="flagNoPersonalizedLearning"

Get state of soft input keyboard on Android

I have an EditText in my Android app, with a normal keyboard attached to it, e.g. there are no custom filters, or other restrictions set on it. I would like to find out if the user uses the QWERTY keyboard, or she switched to another type, for example to the one where the numbers are displayed, and other special characters. Is this possible?
Thanks.

Android keyboard suggestions - Numbers doesn't appear

I want to enable suggestions for the Android keyboard. Currently I have enabled it through the device.
What and where should I write the code for enabling the same?
And, in the suggestions is there any possibility to add numbers as well? If not suggestions atleast see the numbers that I am typing? I want this because, the text box is covered by the keyboard and I am unable to see the text I am typing. So, is it possible to enable suggestions such that every word I type is made visible in the suggestions window?
As you can see below, the number 1234 has appeared after I typed it on the keyboard. However on the device, this suggestion doesn't appear.
The image is supposed to appear right above.

can one prevent the Android device emulator from popping up the onscreen keyboard?

I am developing an Android application. What I find most annoying during testing is, that the emulator always pops up that on-screen telephone keyboard whenever I click into a text input field. Since I input my data with the keyboard anyway I find that most annoying. Can one switch that on-screen keyboard appearance off? Or can one change that so that it at least presents a mini-qwerty keyboard as my actual device does, not that old-fashioned T9 keyboard?
Michael
You can disable the virtual keyboard in Settings->Language.
If you change orientation of the emulator it won't popup (KEYPAD_7, Ctrl-F11).
If you use cursor keys instead of clicking the fields, probably won't popup either.
Whatever you do, keep in mind that in actual devices it usually pops up anyway.

How can I switch to the Android keyboard "SMS" mode

The default Messaging app in Android (tested against version 2.1) appears to put the soft keyboard in a special mode, where the return key is replaced with an "emoticon key". When you press it you get a selection of emoticons to insert into your message.
(source: futurenet.com)
How do I instruct the soft keyboard to appear in this mode in my app?
This is definitely an imeOption being set immediately on EditText. I don't know exactly which one it is, it doesn't seem to match any of the ones described here. You might be able to use Hierarchy Viewer to help you pin down what the exact options are.

Categories

Resources