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?
Asked
Active
Viewed 2,478 times
1 Answers
20
Use:
<android.support.v7.widget.SwitchCompat
...
android:background="@null" />

natario
- 24,954
- 17
- 88
- 158
-
2It 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. – jdonmoyer Feb 20 '15 at 16:18