2

I want to know how to change color of circle and border of radio button in android.please help me i trying this for two days.

niraj kumar
  • 103
  • 2
  • 2
  • 9

2 Answers2

5

More simple, just set the buttonTint color: (only works on api level 21 or above)

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/radio"
android:checked="true"
     android:buttonTint="@color/your_color"/>

in your values/colors.xml put your color in this case a reddish one:

<color name="your_color">#e75748</color>
Subho
  • 539
  • 1
  • 9
  • 25
0

You need to set drawable to your RadioButton to change the color and border or any other part of it.

You can find more info here: RadioButton - how to use a custom drawable?

You can use the tint feature, but this won't work in older devices. Choose this if you are not supporting < API 21.

Community
  • 1
  • 1
Henry
  • 17,490
  • 7
  • 63
  • 98