How to change the switch button color in preferences screen?
<p>I am using the &quot;SettingsTheme&quot; for a preferences screen in my app with its parent theme being &quot;Theme.DeviceDefault.Settings&quot;. How can I change the color of the switch button and the checkbox in this theme on SAMSUNG devices? The configuration below only changes the colors on other devices.</p>
<p>My styles-v23 xml:</p>
<pre><code>&lt;resources&gt;
&lt;style name=&quot;AppTheme&quot; parent=&quot;android:Theme.DeviceDefault&quot;&gt;
    &lt;item name=&quot;colorPrimary&quot;&gt;@color/colorPrimary&lt;/item&gt;
    &lt;item name=&quot;colorPrimaryDark&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
    &lt;item name=&quot;colorAccent&quot;&gt;@color/colorAccent&lt;/item&gt;
    &lt;item name=&quot;android:windowActionBar&quot;&gt;true&lt;/item&gt;
    &lt;item name=&quot;android:windowNoTitle&quot;&gt;false&lt;/item&gt;
    &lt;item name=&quot;android:statusBarColor&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
    &lt;item name=&quot;android:backgroundTint&quot;&gt;@color/colorBack&lt;/item&gt;
    &lt;item name=&quot;android:navigationBarColor&quot;&gt;@color/colorPrimary&lt;/item&gt;
    &lt;item name=&quot;android:actionBarStyle&quot;&gt;@style/TransparentActionBar&lt;/item&gt;
    &lt;item name=&quot;android:windowActionBarOverlay&quot;&gt;true&lt;/item&gt;
    &lt;item name=&quot;android:windowContentOverlay&quot;&gt;@null&lt;/item&gt;
    &lt;item name=&quot;android:actionOverflowButtonStyle&quot;&gt;@android:style/Widget.DeviceDefault.ActionButton.Overflow&lt;/item&gt;
    &lt;item name=&quot;android:popupMenuStyle&quot;&gt;@android:style/Widget.DeviceDefault.PopupMenu&lt;/item&gt;
&lt;/style&gt;
...
&lt;style name=&quot;SettingsTheme&quot; parent=&quot;android:Theme.DeviceDefault.Settings&quot;&gt;
    &lt;item name=&quot;colorPrimary&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
    &lt;item name=&quot;colorPrimaryDark&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
    &lt;item name=&quot;colorAccent&quot;&gt;@color/colorAccent&lt;/item&gt;
    &lt;item name=&quot;android:colorPrimary&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
    &lt;item name=&quot;android:colorPrimaryDark&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
    &lt;item name=&quot;android:colorAccent&quot;&gt;@color/colorBack&lt;/item&gt;
    &lt;item name=&quot;android:statusBarColor&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
    &lt;item name=&quot;android:colorBackground&quot;&gt;@android:color/white&lt;/item&gt;
    &lt;item name=&quot;android:windowActionBar&quot;&gt;true&lt;/item&gt;
    &lt;item name=&quot;android:windowNoTitle&quot;&gt;false&lt;/item&gt;
    &lt;item name=&quot;android:logo&quot;&gt;@android:color/transparent&lt;/item&gt;
    &lt;item name=&quot;android:textColorPrimary&quot;&gt;@android:color/white&lt;/item&gt;
    &lt;item name=&quot;android:textColor&quot;&gt;#000000&lt;/item&gt;
    &lt;item name=&quot;android:textColorPrimaryInverse&quot;&gt;@android:color/widget_edittext_dark&lt;/item&gt;
    &lt;item name=&quot;android:colorButtonNormal&quot;&gt;#000000&lt;/item&gt;
    &lt;item name=&quot;android:titleTextColor&quot;&gt;#FFFFFF&lt;/item&gt;
    &lt;item name=&quot;android:alertDialogTheme&quot;&gt;@style/AlertDialogTheme&lt;/item&gt;
&lt;/style&gt;
</code></pre>