I'm trying to programmatically disable suggestions with setInputType()
using InputType TYPE_TEXT_FLAG_NO_SUGGESTIONS
.
While this works for most keyboards, this doesn't work when using the "Gboard" keyboard; even with this input type, suggestions always appear. The problem is that the user can choose if he wants to have suggestions on input fields, regardless of the input type specified by the EditText.
How can the suggestions be suppressed for all keyboards, including Gboard?
If you're using the beta version of Gboard, where the feature is currently available, head into Settings > System > Languages & input > Virtual keyboard > Gboard > Clipboard and disable the Show recently copied text and images in suggestions bar option. Clipboard suggestions should now be turned off for you.
Users can enable or disable autofill as well as change the autofill service by navigating to Settings > System > Languages & input > Advanced > Input assistance > Autofill service.
On Android To do so, open Gboard settings > Text correction. Turn off the toggle for “Show suggestion strip“. The word suggestions bar now won't appear while typing.
I found a solution :
view.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
However you can see a little Font difference between an Input with suggestions and without.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With