1

I have a list view in which I have list items populated dynamically. Each list item has a radio button.I want that if one list item's radio button is selected then other one must be de selected but it is not working

Mukesh Mishra
  • 241
  • 1
  • 3
  • 12

2 Answers2

1

You can modify the data list and set the Radio button for each row (except the one currently selected) to un-selected. And then you can call adapter.notifyDataSetChanged().

Rachit
  • 3,173
  • 3
  • 28
  • 45
1

To achieve this you should use singleChoice ListView with custom layout containing radio button. You can take a look at a bunch of answers/articles about how to use singleChoice ListView.

For example:

Community
  • 1
  • 1
krossovochkin
  • 12,030
  • 7
  • 31
  • 54