AutocompleteTextView with async suggestions doesn't show dropdown

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 
suggestions.setAdapter(this.suggestAdapter);
suggestAdapter.notifyDataSetChanged();

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

adapter.setNotifyOnChange(true)

which makes it unnecessary to call

adapter.notifyDatasetChanged()

See setNotifyOnChange Hope I could be of help.


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...

autoRailwayFrom.setText(autoRailwayFrom.getText());
adapterFrom.notifyDataSetChanged();
autoRailwayFrom.showDropDown();