I have a MultiAutoCompleteTextView
widget in my Activity, which has an ArrayAdapter<String>
that is populated by a result from a web-based call. As the user types in characters in the textview, this adapter's list should get updated in the background. What is the best way to implement this?
I have already tried to use AsyncTask
to download the strings list in the background, but notifyDataSetChanged()
was being called from the "non-originating thread". Moreover, this seems a little roundabout.
The other option I came across is that Filterable
can be used, but I haven't come across any simple examples (AutoComplete4 seems like an overkill) on how to do this. If there are no examples, can someone give a broad overview of the actors i will need - Filter, Filterable, etc.
Also is this a good way to go?
Thanks,
Rajath