I have set flat icon for all my Preference, I would like to change the color of that icon globally.
When I try the below code it even changes the back button color in the toolbar.
I want only Preference icon tint to be changed globally. Thank in advance.
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference
android:id="@+id/pref_toggle_alarm"
android:icon="@drawable/ic_pref_notifications"
android:key="key_toggle_alarm"
android:summaryOff="Alarm OFF"
android:summaryOn="Alarm ON"
android:title="Alarm" />
<web.prefs.TimePrefs
android:id="@+id/pref_select_time"
android:icon="@drawable/ic_pref_time"
android:key="key_time"
android:summary="Set some time"
android:title="Select Time" />
<MultiSelectListPreference
android:id="@+id/pref_select_week"
android:defaultValue="@array/week_array_values"
android:entries="@array/array_week_selection"
android:entryValues="@array/week_array_values"
android:icon="@drawable/ic_pref_time"
android:key="key_week"
android:title="Select Days" />
<ListPreference
android:id="@+id/pref_track"
android:defaultValue="0"
android:entries="@array/tracks_arrays"
android:entryValues="@array/tracks_arrays_values"
android:icon="@drawable/ic_music_note"
android:key="key_track"
android:summary="%s"
android:title="Select Track" />
</PreferenceScreen>
style.xml
<style name="PreferencesTheme" parent="@style/AppTheme.NoActionBar">
<item name="android:textColorPrimary">@color/primary_text</item>
<item name="android:textColorSecondary">@color/secondary_text</item>
<item name="android:colorAccent">@color/accent</item>
<item name="android:tint">@color/accent</item>
</style>
<item name="colorAccent">@color/your_color</item>
– Portwine