AutoCompleteTextView

The display drop-down list displays similar content

MultiAutoCompleteTextView                   

Support multiple selection (e.g. email selection)


rendering

AutoCompleteTextView (e.g. Baidu search)

 

The unique properties

Android: completionThreshold = “2”

Sets how many characters are entered to be automatically matched

steps

1. Declare variables in MainActivity first

Initialize a variable

Error: findViewById returns the View parent class, which needs to be cast.

2. Write an adapter

Use string

3. Write data sources

4. Bind the Adapter to the AutoCompleteTextView

5. Set special properties in activity_mian. XML

MultiAutoCompleteTextView support alternative (such as email selection)

Special attributes

mttxt.setTokenizer(newMultiAutoCompleteTextView.CommaTokenizer());

Specify what delimiter indicates closure

1. Add the option

2. Initialize it in mainActivity. Java

3. Use the previous data source directly

4. Set the delimiter (comma)

(PS: this is directly connected to the new class written in the horse light)