implement custom preference category element

This commit is contained in:
dkanada 2021-05-21 08:41:34 +09:00
commit abcb807518
12 changed files with 74 additions and 14 deletions

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="?android:textColorSecondary" />

View file

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="color_primary">#3F51B5</color>
<color name="color_accent">#F50057</color>
<!-- Pink A400 -->
<color name="color_favorite">#F50057</color>

View file

@ -2,7 +2,7 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_cache">
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_cache">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEListPreference
app:iconSpaceReserved="false"
@ -24,6 +24,6 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_media_cache_size" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</com.dkanada.gramophone.views.settings.JellyPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -1,7 +1,7 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_colors">
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_colors">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEListPreference
app:iconSpaceReserved="false"
@ -34,6 +34,6 @@
android:summary="@string/pref_summary_colored_shortcuts"
android:title="@string/pref_title_colored_shortcuts" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</com.dkanada.gramophone.views.settings.JellyPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -1,7 +1,7 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_library">
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_library">
<Preference
app:iconSpaceReserved="false"
@ -26,6 +26,6 @@
android:summary="@string/pref_summary_remember_tab"
android:title="@string/pref_title_remember_tab" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</com.dkanada.gramophone.views.settings.JellyPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -1,7 +1,7 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_lock_screen">
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_lock_screen">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
app:iconSpaceReserved="false"
@ -18,6 +18,6 @@
android:summary="@string/pref_summary_blur_album_art"
android:title="@string/pref_title_blur_album_art" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</com.dkanada.gramophone.views.settings.JellyPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -1,7 +1,7 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_notification">
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_notification">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATESwitchPreference
app:iconSpaceReserved="false"
@ -17,6 +17,6 @@
android:summary="@string/pref_summary_colored_notification"
android:title="@string/pref_title_colored_notification" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</com.dkanada.gramophone.views.settings.JellyPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -2,13 +2,13 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_now_playing_screen">
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_now_playing_screen">
<Preference
app:iconSpaceReserved="false"
android:key="now_playing_screen"
android:title="@string/pref_title_now_playing_appearance" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</com.dkanada.gramophone.views.settings.JellyPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -2,7 +2,7 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_audio">
<com.dkanada.gramophone.views.settings.JellyPreferenceCategory android:title="@string/pref_header_audio">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEListPreference
app:iconSpaceReserved="false"
@ -51,6 +51,6 @@
android:summary="@string/pref_summary_remember_queue"
android:title="@string/pref_title_remember_queue" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</com.dkanada.gramophone.views.settings.JellyPreferenceCategory>
</androidx.preference.PreferenceScreen>