For my AutoCompleteTextView I need to get data from a web service. Since this may take a little time, I don’t want the UI thread to not respond, so I need to somehow extract the data into a separate stream. For example, when retrieving data from SQLite DB, it is very easy to do this using the CursorAdapter method - runQueryOnBackgroundThread . I looked at other adapters, such as ArrayAdapter , BaseAdapter , but could not find anything like it ...
Is there an easy way to achieve this? I can’t just use the ArrayAdapter directly, since the list of sentences is dynamic - I always select the list of sentences depending on user input, so it cannot be pre-programmed and cached for future use ...
If someone can give some advice or examples on this topic - it would be great!
android multithreading autocompletetextview
Laimoncijus
source share