AutocompleteTextView not showing its dropdown

1.6k views Asked by At

I've tried almost everything.

Initially I was trying to set two adapters on the same AutocompleteTextView (one at a time). Only the first one worked so I removed that, and placed this in place of it.

ArrayAdapter<String> aa = new ArrayAdapter<String>(con, R.layout.dropdown_autocomplete, new String[]{"1", "2"});
    pickup_at.setThreshold(1);
    pickup_at.setAdapter(aa);
    aa.notifyDataSetChanged();

This is the simplest possible code and it should work. Or am I making some stupid mistake?

1

There are 1 answers

0
rahul.ramanujam On

Your threshold is 1 and the length of the string is 1 too. Change the threshold to 0 or increase the length of the string.