Checkbox with Radiobutton appearance

Asked

Viewed 162 times

1

Next bunch of you: I have an android form that has some radiobutton’s and I need that these items can be unchecked when clicked. Ex: I clicked on the first and it is marked, if I click on the second radiobutton the first will continue marked only being unchecked when I click on it again. (Obs. I know checkboxes do this but in this case I really would need them to be radiobutton’s) Thank you in advance.

  • It can explain the reason better. Because this is not the expected behavior of a radioButton.

  • Like I said up there, I know it’s not the expected behavior. It was the request of a customer who would like it to be the radiobutton, just so I still remain doubtful.

1 answer

1


Add the following attribute to Checkbox:

style="@android:style/Widget.CompoundButton.RadioButton"

Example:

<CheckBox style="@android:style/Widget.CompoundButton.RadioButton"
    android:id="@+id/checkBox1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="CheckBox"/>
  • Show Ramaral. It was just that. Really thanks for the help.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.