How to apply a custom style to SwitchCompat
问题 I would like to apply a custom style to SwitchCompat. Change drawables and text for on and off state. How can I achieve this? I can't find any examples on how this is done. I tried the following in my styles.xml but apparently I'm not using the right parent: <style name="Switch" parent="android:Widget.AppCompat.Widget.CompoundButton.SwitchCompat"> <item name="android:textOn">@string/common_yes</item> <item name="android:textOff">@string/common_no</item> <item name="android:thumb">@drawable