Asim
Asim

Reputation: 7114

AutocompleteTextView not showing its dropdown

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?

Upvotes: 0

Views: 1597

Answers (1)

rahul.ramanujam
rahul.ramanujam

Reputation: 5618

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.

Upvotes: 1

Related Questions