I've to style Switch in android and found a good resource here at SO, I've
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/switch_off_2" />
<item android:state_focused="true" android:drawable="@drawable/switch_off_2" />
<item android:state_checked="true" android:drawable="@drawable/switch_on_2" />
</selector>
and finally the Switch widget as
<Switch
android:background="@drawable/btn_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/switch1"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
but result is
I want to know how can I hide the purple colored switch from this.