0

I have an ACTV which is used to show geo-suggests (via GeoCoder etc.). It's working like charm.

Now I want to force the ACTV to show the history - previously found geolocations - as a drop down when the user touches the empty ACTV or the text size reduces to 0. In this case the ACTV should work like a simple spinner. When the user changes the text, the ACTV should fire off the geocode-search.

What's the easiest way to achieve that?

TIA

injecteer
  • 20,038
  • 4
  • 45
  • 89

1 Answers1

1

You could add an OnTouchListener on the AutoCompleteTextView, invoking:

autoCompleteTextView.showDropDown();

For focus, you could do something similar using an OnFocusChangeListener, but first check that the popup isn't already showing through isPopupShowing().

Paul Lammertsma
  • 37,593
  • 16
  • 136
  • 187