The default dictionary is missing in AutoCompleteTextView / MultiAutoCompleteTextView

We have a chat application for which we recently introduced our own keyboard for Android. In addition, in addition to this, we implement several auto-complete using MultiAutoCompleteTextView. This can be done by creating a custom tokenizer using the standard procedure, as indicated in the Android docs.

Everything seems to be working fine, except for one problem that when converting an EditText to a MultiAutoCompleteTextView or an Android automatic dictionary sentence, AutoCompleteTextView stops appearing. As a chat application, it is extremely important for our users that we offer vocabulary sentences.

There are several other people who posted a similar question, but they, I think, get a lot of community attention. AutoCompleteTextView does not display dictionary suggestions

Conversely, a single post in StackOverflow suggests that he can see dictionary suggestions suggesting a way to disable it. AutoCompleteTextView without dictionary hints

Following some suggestions, I added

android:inputType="textAutoCorrect" 

but that didn't help either.

I have simple questions:

  • Is it possible to have a dictionary in AutoCompleteTextView or MultiAutoCompleteTextView?

  • In case it is possible, how to do it?

Thanks in advance.

+8
android android-layout android-textview autocompletetextview
source share
2 answers

You must install an autocomplete key listener. It looks like AutoCompleteTextView is ignoring the "auto-complete" xml value, so you can do it programmatically.

I do this after AutoCompleteTextView has been created and works for me. You need to indicate "Title", usually NO.

 TextKeyListener input = TextKeyListener.getInstance(true, TextKeyListener.Capitalize.NONE); myAutoComleteTextView.setKeyListener(input); 
+10
source share

I do not want to have a dictionary in autocompletetextview. The user can select the offers displayed in the view. If at all possible, the user will see offers in two places that will be confusing.

-one
source share

All Articles