How can I remove the grey circle (as in the below image) appearing when a switch button changes the state in Android 5.1.1?
Effect when Android's switch changes state
You need to set background of Switch to disable ripple effect. In my case i set background null to achieve this.
<Switch
android:id="@+id/mySwitch"
android:layout_below="@+id/tvStateDefault"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOn="ON"
android:thumb="@drawable/customswitchselector"
android:track="@drawable/custom_track"
android:showText="true"
android:textOff="OFF"
android:background="@null"
android:layout_centerHorizontal="true"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With