0

I have a TextView named Change City. On click of Change city it has to show list of cities in dropdown list. Once the city is selected Change City has to be replaced by corresponding City name.

I tried using adapter (like Spinner) for TextView. It didn't work. Any other suggestions?

DroidLearner
  • 2,115
  • 5
  • 31
  • 50
  • Why don't you just use an actual `Spinner`? Adapters don't work with any view, they work with AdapterViews like Spinner or ListView. – Karakuri Aug 20 '13 at 17:57
  • You should post your code so that someone can help you. You could have an onClickListener added to the `TextView`. That onClickListener could then fire the Spinner. – 2dvisio Aug 20 '13 at 17:57
  • A Spinner is the correct way to do this. Post your code so we can see why the Spinner didn't work. – Tenfour04 Aug 20 '13 at 18:23
  • What you're describe is exactly the behaviour of a `Spinner`. Post the code you tried with a `Spiner` and somebody will help you fix it. – Squonk Aug 20 '13 at 18:23

1 Answers1

0

In a dropdown list I recently implemented, I used a ListView with an adapter set to an ArrayList. It worked great for me. I would recommend it.

Adam Johns
  • 35,397
  • 25
  • 123
  • 176