Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Multiline & No autosuggest in EditText

Is it possible to have an EditText that allows multilines and doesn't show the suggestions? I tried with this code:

android:inputType="textFilter|textMultiLine"

Which I saw in this question, but it didn't work for me. If I try to use both at the same time, the EditText supports multiline, but the suggestions appear. Separately, they work properly.

Is this a bug in the SDK? Or maybe it is not possible to combine them?

Thanks!

like image 960
Antonio Avatar asked Apr 16 '10 13:04

Antonio


3 Answers

This is supposed to do what you want:

android:inputType="textFilter|textMultiLine|textNoSuggestions"

Although I haven't tried it myself. "textNoSuggestions" is only available since API 5.

like image 89
lightversusdark Avatar answered Nov 13 '22 00:11

lightversusdark


If you created Edittext Dynamically and want to achieve Multiline & No autosuggest then you need to use: setRawInputType

editText.setRawInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
like image 23
Nikunj Avatar answered Nov 12 '22 23:11

Nikunj


you can also use android:SingleLine="false" to use multiline for an EditText

like image 1
Pattabi Raman Avatar answered Nov 13 '22 00:11

Pattabi Raman