2

I would like to change the default button button style of Android radio buttons to suit my theme. How could I achieve that?

Android prototype

Sandah Aung
  • 6,156
  • 15
  • 56
  • 98

2 Answers2

4

Create a selector drawable

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:drawable="@drawable/radio_selected"  android:state_checked="true" />
    <item android:drawable="@drawable/radio_normal" />

</selector>

then in your xml of the radio button android:button="@drawable/(your drawable name)"

example:

<RadioButton
    android:id="@+id/radio_button_id"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:button="@drawable/your_drawable_name"
    android:text="your_text" />
youssefhassan
  • 1,067
  • 2
  • 11
  • 17
2

See Adding custom radio buttons in android. Hope this helps you.

Community
  • 1
  • 1
Amit Kumar Khare
  • 565
  • 6
  • 17