Change radio button color

3

I have an application that has black background. In one of the screens of the application I have a RadioButton . I need to change the color of this RadioButtom so that it appears on the screen.

<android.support.v7.widget.AppCompatRadioButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="New RadioButton"
    android:id="@+id/radioButton"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:buttonTint="#FFF" />

The problem is that older versions of Android do not work, that is, the color does not change. Could someone help me with this?

    
asked by anonymous 02.09.2016 / 15:31

1 answer

3

There are several alternatives, one of which is to create a% custom_customer using two images:

SoyoucancreateRadioButtonusingthem:

radio_button_personalizado

<?xmlversion="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_checked="true" android:drawable="@drawable/checkedradiobutton" />
     <item android:state_checked="false" android:drawable="@drawable/unchekedradiobutton" />
</selector>

So you can set radio_button_personalizado.xml to android:button :

Screenshot

Details

02.09.2016 / 15:40