CheckBox with RadioButton look

1

Next team: I have a form on android which has some radiobutton's and I need these items to be unmarked when clicked. Ex: I clicked on the first one and it gets marked, if I click on the second radiobutton the first one will continue marked only getting unmarked when I click it again. (Note that checkbox's do this but in this case it really would have to be radiobutton's) Thank you in advance.

    
asked by anonymous 23.09.2015 / 21:41

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"/>
    
24.09.2015 / 00:47