I am trying to mimic the new material design switch in my app and the switchcompat works pretty well. The only problem is a grey selection box appears around the switch on touch and really takes away from the clean look. Is this something I can remove?
Selection Box around android.support.v7.widget.SwitchCompat
Asked Answered
Use:
<android.support.v7.widget.SwitchCompat
...
android:background="@null" />
It should be noted that doing this removes some of the "Material Design-ness" on Android 5.x devices. It's probably best to encapsulate this in a style and use a styles-v21.xml that does not null the background to guarantee that your UI looks its best on Android 5.x. –
Loan
© 2022 - 2024 — McMap. All rights reserved.