I need to create the switch as the below image
I have both on and off images for it. I implemented them as
<android.support.v7.widget.SwitchCompat
android:id="@+id/swtichTournament"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:showText="false"
android:thumb="@drawable/switch_selector"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:checked="false" />
The selector XML
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/switch_off" />
<item android:state_pressed="true" android:drawable="@drawable/switch_on" />
<item android:state_checked="true" android:drawable="@drawable/switch_on" />
<item android:drawable="@drawable/switch_off" />
This is what I get
As you can see there is some extra color which is not required. How do I remove that?