Turn Off Autosuggest for Edittext

Turn off autosuggest for EditText?

I had the same question but I still wanted to set this option in my XML file so I did a little more research until I found it out myself.

Add this line into your EditText.

android:inputType="textFilter" 

Here is a Tip. Use this line if you want to be able to use the "enter" key.

android:inputType="textFilter|textMultiLine"

Turn off auto suggest of numbers for EditText?

Android O has the feature to support Auto-filling for fields,Just only use this in your xml, It will disable autofill hints

    android:importantForAutofill="no"

How to disable auto-complete and auto-correct of EditText

Add this line into your EditText.

android:inputType="textFilter" 

Here is a Tip. Use this line if you want to be able to use the "enter" key.

android:inputType="textFilter|textMultiLine"

Check this link too:

Android programmatically disable autocomplete/autosuggest for EditText in emulator

Android programmatically disable autocomplete/autosuggest for EditText in emulator

For Vodafone 845 (2.1), huawei 8800 (2.2) devices, textVisiblePassword seems to prevent word prediction.

vendorId.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);

or

android:inputType="textVisiblePassword"

[Edit] this answer is quite old and I don't have the environment anymore to test to get up-to-date info for comments here, sorry.

Disable suggestions for EditText

This worked for me after a long struggle...
Use just android:inputType="textFilter", and remove the hex.setInputType() , it replaces what you configured
in your XML at runtime.

If it still doesn't work you can always try the dirty trick of android:inputType="textVisiblePassword", but I strongly suggest that you give android:inputType="textFilter" another try.



Related Topics



Leave a reply



Submit