AutocompleteTextView offers only offers for the entire offer, and MultiAutoCompleteTextView offers offers for each token in the offer. You can specify what is the separator between tokens.
String[] words=new String[] { "word1", "word2", "word3", "word4", "word5" }; MultiAutoCompleteTextView macTv = (MultiAutoCompleteTextView) this.findViewById(R.id.mac_tv); ArrayAdapter<String> aaStr = new ArrayAdapter<String>(this,android.R.layout.dropdown_item,words); macTv.setAdapter(aaStr); macTv.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer() );
and
<MultiAutoCompleteTextView android:id="@+id/mac_tv" android:layout_width="fill_parent" android:layout_height="wrap_content" android:completionThreshold="1" />
in this example, a sentence appears after each comma.
Eric Mar 02 2018-11-11T00: 00Z
source share