-2

I need to change the size of the circle of the radio button and also the color when I clicked it. It should be like the image below. Do you have some idea or some example? Thanks

jayeshsolanki93
  • 2,096
  • 1
  • 20
  • 37
PaoloPaul
  • 11
  • 4

1 Answers1

1

you can try to use a custom drawable background for your radio button as an example -

<RadioButton
    android:id="@+id/radio0"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/custom_drawable_toggle_background"
    android:button="@null"
    android:checked="true"
    android:text="RadioButton" />

and in your drawable create your custom_drawable_toggle_background.xml

<?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/custom_drawable_background_selected" android:state_checked="true"/>
    <item android:drawable="@drawable/custom_drawable_background_unselected"    android:state_checked="false"/>

 </selector>
Bruno Bieri
  • 9,724
  • 11
  • 63
  • 92
Farya
  • 277
  • 3
  • 14