sdfwer
sdfwer

Reputation: 1042

Multiple Autocomplete Textview

On this tutorial on the android devs about AutoCompleteTextView. Would I need to create multiple instances of xml layout textview if I have multiple AutoCompleteTextView or would using one would be sufficient and place each on an ArrayAdapter

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.list_item, COUNTRIES);

Upvotes: 0

Views: 1615

Answers (1)

Gophermofur
Gophermofur

Reputation: 2101

You just need one list_item XML file. You can re-use that layout for each of your AutoCompleteTextView instances/views. I believe you can even re-use the adapter if the list of auto-complete words are the same.

Upvotes: 2

Related Questions