Re: [android-developers] Radio buttons in list - need only one selectable button

2012-04-25 Thread Mark Murphy
On Tue, Apr 24, 2012 at 9:22 PM, Farhan Tariq farhan@gmail.com wrote: Sadly, there isnt much customization that I can do with it. I googled that up, and all seem to use android.R.layout.simple_list_item_single_choice layout for the purpose. Which is a CheckedTextView -- you can examine the

Re: [android-developers] Radio buttons in list - need only one selectable button

2012-04-24 Thread Farhan Tariq
Sadly, there isnt much customization that I can do with it. I googled that up, and all seem to use android.R.layout.simple_list_item_single_choice layout for the purpose. I also came across checkedTextView, but I couldn't understand the theory behind. Can anyone please explain a little. Thanks in

[android-developers] Radio buttons in list - need only one selectable button

2012-04-23 Thread Farhan Tariq
Hi, I have a listView to which I am adding a number of rows at run time. Each row has a radio button in it. I want only one radio button to be selected at one time, but currently they are all selectable. How can I achieve that? Thanks in advance Regards, Farhan -- You received this message

Re: [android-developers] Radio buttons in list - need only one selectable button

2012-04-23 Thread Mark Murphy
Step #1: Use android.R.layout.simple_list_item_single_choice for your rows, or otherwise switch to CheckedTextView instead of RadioButton. Step #2: Use android:choiceMode=singleChoice. This sample project shows this approach the multipleChoice/android.R.layout.simple_list_item_multiple_choice