Today we will learn how to style some UI components using styles.xml.

Radio Button :- Radio button has states like Normal(not Selected),Activated(Selected) so to change the color according to custom theme follow the below steps

Add below code in styles.xml

To use MyRadioButton in layout.xml :

 

 

CheckBox :- CheckBox has states like Normal(not Selected),Activated(Selected) so to change the color according to custom theme follow the below steps

Add below code in style.xml

 

To use MyCheckBox in layout.xml

 

The output will be as below: