juange87
5/24/2018 - 9:24 AM

Customizing Switch using XML

<style name="SwitchCompatStyle" >
    <item name="thumbTint">@color/switch_color</item>
    <item name="trackTint">@color/switch_color</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<selector 
    xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@color/pure_red" 
          android:state_checked="true" />
    <item android:color="@color/grey"/>
</selector>