I have a simple android.support.v7.widget.SwitchCompat which is shown below
<android.support.v7.widget.SwitchCompat
android:id="@id/settings_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text=""
android:textOff=""
android:textOn=""
android:saveEnabled="false"
android:autoText="false"
android:theme="@style/ToggleButton"/>
My Style
<style name="ToggleButton" parent="@style/Theme.AppCompat.Light">
<item name="colorControlActivated">@color/blue</item>
</style>
The above code seems working fine in API level 20 or greater. Its not working in API level < 20. Min SDK support is 16. Couldn't figure out the problem. Any inputs are appreciated. Thanks!