SVG USE element and :hover style

You can not address an element that is referenced via use. The specs say: For user agents that support Styling with CSS, the conceptual deep cloning of the referenced element into a non-exposed DOM tree also copies any property values resulting from the CSS cascade ([CSS2], chapter 6) on the referenced element and its contents. … Read more

How can I style an Android Switch?

You can define the drawables that are used for the background, and the switcher part like this: <Switch android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:thumb=”@drawable/switch_thumb” android:track=”@drawable/switch_bg” /> Now you need to create a selector that defines the different states for the switcher drawable. Here the copies from the Android sources: <selector xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:state_enabled=”false” android:drawable=”@drawable/switch_thumb_disabled_holo_light” /> <item android:state_pressed=”true” android:drawable=”@drawable/switch_thumb_pressed_holo_light” … Read more