Reputation: 16385
I have a Custom List View where each item in the List contains a Radio Button. I want only one Radio Box in the List to be selected. How can do this ? If i place the Radio Group on the layout i inflate, each Radio Button will be added to it own group ?
Kind regards, Mateen
Upvotes: 3
Views: 2891
Reputation: 1623
As you have a custom adapter you can yourself uncheck the previously checked radiobutton when a other list item is selected.
Upvotes: 1
Reputation: 1305
U can set the adapter like this...
setListAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_single_choice,android.R.id.text1, names));
Refer this link it may helpfull.. http://www.vogella.de/articles/AndroidListView/article.html
Upvotes: 8