I'm trying to implement custom switch using two images for false and true respectively . But the problem is default switch image us overlapping with custom switch images.
Below is my code for Switch:
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Do you want the current offer as your final offer"
android:background="@null"
android:button="@null"
android:textOff=""
android:textOn=""
android:drawableRight="@drawable/switch"
android:textSize="16sp"
android:textColor="#9B9B9B"
android:id="@+id/switch1"
/>
And the following is my switch.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/dummy_toggle_off"
android:state_checked="false" />
<item
android:drawable="@drawable/dummy_toggle_on"
android:state_checked="true" />
<item
android:drawable="@drawable/dummy_toggle_off"/>
</selector>
Here are the resulting images :