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
  • 2
  • 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
  • 2,995
  • 2
  • 27
  • 44
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
  • 11,830
  • 7
  • 29
  • 53