4

I have a spinner in my Android app, that allows users to select countries. The spinner shows the ISO2 code of the selected country when folded. Here an example:

Capture 1

Once the user opens the selection pop-up list, I want to display a more extensive text for each item. So instead of displaying just "AT", the item should read "AT - Austria" as shown in the following screen-shot.

Capture 2

Any ideas how I could achieve this?

Cristian
  • 198,401
  • 62
  • 356
  • 264
Philipp
  • 788
  • 1
  • 11
  • 23

1 Answers1

1

SpinnerAdapter has a getDropDownView method that can return a different view for the expanded state.

adamp
  • 28,862
  • 9
  • 81
  • 69