Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off auto suggest of numbers for EditText?

Tags:

java

android

xml

Number suggestions pop up when you tap at edittext. Is there a way to receive input as number but at the same time prevent number suggestions from displaying?

I have found something similar like this. but it accepts text not numbers!

Turn off autosuggest for EditText?

below are not working since it only accepts texts and then removes suggestions.

android:inputType="textFilter" 
android:inputType="textNoSuggestions" 

I have tried

android:inputType="number|textNoSuggestions" 

It results to accepting non-numeric symbols and does not remove suggestions either.

screenshot

like image 217
Leandro Keen Zapa Avatar asked Nov 29 '22 21:11

Leandro Keen Zapa


1 Answers

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"
like image 169
Sandeep Parish Avatar answered Dec 04 '22 12:12

Sandeep Parish