Android: AutoCompleteTextView show suggestions when no text entered

fhucho picture fhucho · Jan 24, 2010 · Viewed 86.2k times · Source

I am using AutoCompleteTextView, when the user clicks on it, I want to show suggestions even if it has no text - but setThreshold(0) works exactly the same as setThreshold(1) - so the user has to enter at least 1 character to show the suggestions.

Answer

CommonsWare picture CommonsWare · Jan 24, 2010

This is documented behavior:

When threshold is less than or equals 0, a threshold of 1 is applied.

You can manually show the drop-down via showDropDown(), so perhaps you can arrange to show it when you want. Or, subclass AutoCompleteTextView and override enoughToFilter(), returning true all of time.