I'm using a MultiAutoCompleteTextView in my app to show various suggestions.
I noticed that MultiAutoCompleteTextView doesn't support the regular android suggerstion that come defaultly with an EditText (the strip of suggestions that pops above the soft keyboard.
Is there a way of showing both the regular suggestions, and the ones I want to show in my MultiAutoCompleteTextView?
Difference Between AutoCompleteTextView and MultiAutoCompleteTextView. An AutoCompleteTextView only offers suggestion about the whole text. But MultiAutoCompleteTextView offers multiple suggestions for the substring of the text.
EditText is used for user input. TextView is used to display text and is not editable by the user. TextView can be updated programatically at any time.
If you want to get suggestions , when you type in an editable text field , you can do this via AutoCompleteTextView. It provides suggestions automatically when the user is typing. The list of suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of the edit box with.
XML Attributes of Edittext in AndroidUsed to specify how to align the text like left, right, center, top, etc. Used to set size of the text. Used to set color of the text. Used to set style of the text.
I found that setting the input types only took effect when I set them with setRawInputType()
. I also found out that the only way to use InputType.TYPE_TEXT_FLAG_AUTO_CORRECT
was to include
include InputType.TYPE_CLASS_TEXT
also. So it would result in something like this:
multiAutoCompleteTextView.setRawInputType(InputType.TYPE_CLASS_TEXT
|InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
|InputType.TYPE_TEXT_FLAG_AUTO_CORRECT
|InputType.TYPE_TEXT_FLAG_MULTI_LINE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With