0

here i used the listview with radio button and checkbox , i want my radiobutton to get checked only when the corresponding checkbox is selected and even i want those checked references so that i can put some conditions according to my requirement, thanks in advance.

Is there any better way than using listview ?

enter image description here

1 Answer 1

1

Is there any better way than using listview ?

Yes.

CheckBoxes are used when you want the user to select more than one option.

RadioButtons are used when you want the user to select one option out of many.

With that being said. You could either only use CheckBoxes or RadioButtons, using both together doesn't make sense, because both server a different purpose.

You could however use a RadioGroup instead of a ListView.

Sign up to request clarification or add additional context in comments.

4 Comments

in my case i want both checkbox and radiobuttons , so that i can select multiple rows using checkboxes and merge them in to main row in which radio button is selected
Well in that case, you could show a list of CheckBoxes, and when the user taps the merge button, you could show a popup with a RadioGroup to select where to merge it in.
that sounds good, but actually am new to android can you please say how to show popup with items on which checkboxes are selected

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.