I have a selection for some items using a spinner widget. At the moment the spinner will load a simple Textview and show the name of the item.
It is possible to define an own view to show inside the spinner row? I would suspect it being similar to a custom List row.
I simply want to show an individual icon left from the spinner text for each item in the list.
Yes, you can do that – as you may know,
Spinneris a type ofAdapterView, which means that you can adapt your own data to show in suchView.The approach is pretty similar to the one with
ListView.Excerpt from ApiDemos:
You can define your own layout and pass it to the
SpinnerAdaptersubclass that you use.