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
What Are Advantages of Setting Largeheap to True
How to Check Current Running Applications in Android
Start_Sticky Does Not Work on Android Kitkat
Android - iPhone Style Tabhost
Android Popupwindow with Tooltip Arrow
Change Locale Not Work After Migrate to Androidx
App Is Misconfigured for Facebook Login: Android Facebook Integration Issue
Requestfeature() Must Be Called Before Adding Content
How to Make an Android App Return to the Last Open Activity When Relaunched
How to Monitor the Network Connection Status in Android
How to Clear a Notification in Android
Data Sharing Between Two Applications
How to Redirect My Log Output from Logcat to the Sd-Card on an Android Device
How to Escape Special Characters Like ' in SQLite in Android