Take the 2-minute tour ×

I add TextChangedListener to AutocompleteTextView. In TextChangedListener's afterTextChanged() I invoke AsyncTask which loads data from web (loading all the data when activity starts is not an option because lists can be pretty large, so it becomes just waste of traffic). AsyncTask's onPostExecute() looks like that (I use ArrayAdapter):

    protected void onPostExecute(ArrayList<Subregion> result)
        if (result != null)
            for (Iterator<Subregion> iterator = result.iterator(); iterator.hasNext();)
                Subregion subregion = iterator.next();

Subregion is my custom object with overriden toString(). I want my program to start loading data when user starts typing and show results at once they are received and parsed.

My problem:

autocompleteTextView.showDropDown() has no effect. onPostExecute() receives correct list of data, they are added to adapter, but showDropDown() doesn't show the dropdown. What's the matter?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

I am doing the exact same thing, and I just achieved this functionality. Instead of clearing the adapter and building it individually, set the adapter as below(I do this in a function which is called in the onPostExecute);

//suggestions is a string array of suggestions.
suggestAdapter = new ArrayAdapter<String>(this, R.layout.suggestions, suggestions);
//The autocomplete view 

You do not need to explicitly call showdropdown, the autocomplete view is automatically updated when the adapter notifies it that data has been changed.

You also can call


which makes it unnecessary to call


See setNotifyOnChange Hope I could be of help.

share|improve this answer

I also faced this issue. My completion threshold was 2. When 2 chars are typed, I was fetching data from server and had filled in array adapter but autoRailwayFrom.showDropDown(); does not show drop down...

I just write on line and it works...

share|improve this answer
showDropDown actually helped –  Dmitry Zaitsev Mar 12 '13 at 7:28
Rewriting the text definitely helped me, it caused the whole process to restart on my onResponse. Thank you so much! –  upisdown Oct 20 '13 at 11:56

Your Answer


