add custom color preference for primary and accent colors

This commit is contained in:
dkanada 2021-05-30 11:58:05 +09:00
commit 56298b08c3
11 changed files with 150 additions and 72 deletions

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<com.dkanada.gramophone.views.ColorCircleDrawable
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/color"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_margin="8dp"
android:layout_gravity="end" />

View file

@ -13,21 +13,21 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_theme" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEColorPreference
<com.dkanada.gramophone.views.settings.ColorPreference
app:iconSpaceReserved="false"
android:defaultValue="@color/color_primary"
android:key="primary_color"
android:persistent="false"
android:summary="@string/pref_summary_primary_color"
android:title="@string/pref_title_primary_color" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEColorPreference
<com.dkanada.gramophone.views.settings.ColorPreference
app:iconSpaceReserved="false"
android:defaultValue="@color/color_accent"
android:key="accent_color"
android:persistent="false"
android:summary="@string/pref_summary_accent_color"
android:title="@string/pref_title_accent_color" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="colored_shortcuts"

View file

@ -19,7 +19,7 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_page_size" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="remember_last_tab"

View file

@ -3,14 +3,14 @@
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_lock_screen">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="show_album_cover"
android:summary="@string/pref_summary_show_album_art"
android:title="@string/pref_title_show_album_art" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:dependency="show_album_cover"

View file

@ -3,14 +3,14 @@
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_notification">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="classic_notification"
android:summary="@string/pref_summary_classic_notification"
android:title="@string/pref_title_classic_notification" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="colored_notification"

View file

@ -29,21 +29,21 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_maximum_bitrate" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="audio_ducking"
android:summary="@string/pref_summary_audio_ducking"
android:title="@string/pref_title_audio_ducking" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="remember_shuffle"
android:summary="@string/pref_summary_remember_shuffle"
android:title="@string/pref_title_remember_shuffle" />
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="remember_queue"