Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable suggestions for EditText

What I have tried:

specifying the inputType for the EditText on the main.xml page as...

textFilter
text|textNoSuggestions 
textNoSuggestions

In the java file in the onCreate

EditText hex = (EditText) findViewById(R.id.editHex);
hex.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);

I'm running this on an emulator using API 13.

like image 685
Rhyono Avatar asked Sep 18 '25 06:09

Rhyono


1 Answers

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.

like image 150
Rotemmiz Avatar answered Sep 19 '25 21:09

Rotemmiz