I've created a custom arrayadapter to handle a json response that I'm successfully throwing into a listview. However, I'm unsure of the best way to display radio buttons next to each item... I've read about using android.R.layout.simple_list_item_single_choice as the default view, but I'm using a custom adapter and a custom xml to display my data... so I'm wondering in this case what is the best way to implement radio buttons on a listview? thx
Asked
Active
Viewed 2,272 times
1 Answers
2
I think this can help you.
Just change the line
getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
to
getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
Hope this helps !!

Community
- 1
- 1

Prateek Jain
- 1,234
- 14
- 24
-
This isn't exactly what I was looking for, but it's a great start and I think it will be a lot of help towards me resolving the issue. Thanks – Stokedbits Dec 22 '10 at 21:36
-
Do you have to keep track of states yourself? – Thomas Ahle Aug 28 '11 at 14:56