Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get radio button appearance in checkbox?

Tags:

android

I'm just trying to use different checkboxes whose appearance should looks like an radio button which is like a round button with a green light inside. I googled this for long time but didn't find a solution, is there any way to do this.

Thanks in advance.

like image 486
Vignesh Avatar asked Apr 29 '11 08:04

Vignesh


1 Answers

Even better way is to set the style of the CheckBox to match that of a RadioButton.

@android:style/Widget.CompoundButton.RadioButton

Making the CheckBox to look like this

<CheckBox style="@android:style/Widget.CompoundButton.RadioButton" />

It works great! My answer is inspired by this post.

like image 131
apostolov Avatar answered Nov 06 '22 11:11

apostolov