Improved settings screen

This commit is contained in:
h4h13 2019-06-02 15:40:33 +05:30
parent a83decd146
commit 960657878e
24 changed files with 229 additions and 129 deletions

View file

@ -17,10 +17,12 @@ package code.name.monkey.retromusic.preferences
import android.app.Dialog
import android.content.Context
import android.content.res.TypedArray
import android.graphics.PorterDuff
import android.os.Bundle
import android.util.AttributeSet
import androidx.preference.ListPreference
import androidx.preference.PreferenceDialogFragmentCompat
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.retromusic.R
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
@ -30,13 +32,25 @@ import com.afollestad.materialdialogs.list.listItemsSingleChoice
class MaterialListPreference : ListPreference {
private val mLayoutRes = R.layout.ate_preference_list
constructor(context: Context) : super(context)
constructor(context: Context) : super(context) {
init(context)
}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
private fun init(context: Context) {
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
init(context)
}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
init(context)
}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {
init(context)
}
override fun getDialogLayoutResource(): Int {
return mLayoutRes

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M6 13c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0 4c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0-8c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm-3 0.5c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zM6 5c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm15 5.5c0.28 0 0.5-0.22 0.5 -0.5s-0.22-0.5-0.5-0.5-0.5 0.22 -0.5 0.5 0.22 0.5 0.5 0.5 zM14 7c0.55 0 1-0.45 1-1s-0.45-1-1-1-1 0.45-1 1 0.45 1 1 1zm0-3.5c0.28 0 0.5-0.22 0.5 -0.5s-0.22-0.5-0.5-0.5-0.5 0.22 -0.5 0.5 0.22 0.5 0.5 0.5 zm-11 10c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zm7 7c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zm0-17c0.28 0 0.5-0.22 0.5 -0.5s-0.22-0.5-0.5-0.5-0.5 0.22 -0.5 0.5 0.22 0.5 0.5 0.5 zM10 7c0.55 0 1-0.45 1-1s-0.45-1-1-1-1 0.45-1 1 0.45 1 1 1zm0 5.5c-0.83 0-1.5 0.67 -1.5 1.5s0.67 1.5 1.5 1.5 1.5-0.67 1.5-1.5-0.67-1.5-1.5-1.5zm8 0.5c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0 4c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0-8c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0-4c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm3 8.5c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zM14 17c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm0 3.5c-0.28 0-0.5 0.22 -0.5 0.5 s0.22 0.5 0.5 0.5 0.5-0.22 0.5 -0.5-0.22-0.5-0.5-0.5zm-4-12c-0.83 0-1.5 0.67 -1.5 1.5s0.67 1.5 1.5 1.5 1.5-0.67 1.5-1.5-0.67-1.5-1.5-1.5zm0 8.5c-0.55 0-1 0.45-1 1s0.45 1 1 1 1-0.45 1-1-0.45-1-1-1zm4-4.5c-0.83 0-1.5 0.67 -1.5 1.5s0.67 1.5 1.5 1.5 1.5-0.67 1.5-1.5-0.67-1.5-1.5-1.5zm0-4c-0.83 0-1.5 0.67 -1.5 1.5s0.67 1.5 1.5 1.5 1.5-0.67 1.5-1.5-0.67-1.5-1.5-1.5z" />
</vector>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-0.28 0-0.5 0.22 -0.5 0.5 0 0.12 0.05 0.23 0.13 0.33 0.41 0.47 0.64 1.06 0.64 1.67 0 1.38-1.12 2.5-2.5 2.5zm0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c0.28 0 0.5-0.22 0.5 -0.5 0-0.16-0.08-0.28-0.14-0.35-0.41-0.46-0.63-1.05-0.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 6.5 10 C 7.32842712475 10 8 10.6715728753 8 11.5 C 8 12.3284271247 7.32842712475 13 6.5 13 C 5.67157287525 13 5 12.3284271247 5 11.5 C 5 10.6715728753 5.67157287525 10 6.5 10 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 9.5 6 C 10.3284271247 6 11 6.67157287525 11 7.5 C 11 8.32842712475 10.3284271247 9 9.5 9 C 8.67157287525 9 8 8.32842712475 8 7.5 C 8 6.67157287525 8.67157287525 6 9.5 6 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 14.5 6 C 15.3284271247 6 16 6.67157287525 16 7.5 C 16 8.32842712475 15.3284271247 9 14.5 9 C 13.6715728753 9 13 8.32842712475 13 7.5 C 13 6.67157287525 13.6715728753 6 14.5 6 Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 17.5 10 C 18.3284271247 10 19 10.6715728753 19 11.5 C 19 12.3284271247 18.3284271247 13 17.5 13 C 16.6715728753 13 16 12.3284271247 16 11.5 C 16 10.6715728753 16.6715728753 10 17.5 10 Z" />
</vector>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:pathData="M0 0h24v24H0V0z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M17.66 5.41l0.92 0.92 -2.69 2.69-0.92-0.92 2.69-2.69M17.67 3c-0.26 0-0.51 0.1 -0.71 0.29 l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c0.4-0.4 0.4 -1.03 0.01 -1.42l-2.34-2.34c-0.2-0.19-0.45-0.29-0.7-0.29zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z" />
</vector>

View file

@ -4,8 +4,7 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M9 11.75c-0.69 0-1.25 0.56 -1.25 1.25s0.56 1.25 1.25 1.25 1.25-0.56 1.25-1.25-0.56-1.25-1.25-1.25zm6 0c-0.69 0-1.25 0.56 -1.25 1.25s0.56 1.25 1.25 1.25 1.25-0.56 1.25-1.25-0.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-0.29 0.02 -0.58 0.05 -0.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c0.78 0 1.53-0.09 2.25-0.26 0.21 0.71 0.33 1.47 0.33 2.26 0 4.41-3.59 8-8 8z" />
android:pathData="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
</vector>

View file

@ -6,5 +6,5 @@
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M10.25 13c0 0.69-0.56 1.25-1.25 1.25S7.75 13.69 7.75 13s0.56-1.25 1.25-1.25 1.25 0.56 1.25 1.25zM15 11.75c-0.69 0-1.25 0.56 -1.25 1.25s0.56 1.25 1.25 1.25 1.25-0.56 1.25-1.25-0.56-1.25-1.25-1.25zm7 0.25c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10zM10.66 4.12C12.06 6.44 14.6 8 17.5 8c0.46 0 0.91-0.05 1.34-0.12C17.44 5.56 14.9 4 12 4c-0.46 0-0.91 0.05 -1.34 0.12 zM4.42 9.47c1.71-0.97 3.03-2.55 3.66-4.44C6.37 6 5.05 7.58 4.42 9.47zM20 12c0-0.78-0.12-1.53-0.33-2.24-0.7 0.15 -1.42 0.24 -2.17 0.24 -3.13 0-5.92-1.44-7.76-3.69C8.69 8.87 6.6 10.88 4 11.86c0.01 0.04 0 0.09 0 0.14 0 4.41 3.59 8 8 8s8-3.59 8-8z" />
android:pathData="M12 5.69l5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z" />
</vector>

View file

@ -2,8 +2,8 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M19,19H21V21H19V19M19,17H21V15H19V17M3,13H5V11H3V13M3,17H5V15H3V17M3,9H5V7H3V9M3,5H5V3H3V5M7,5H9V3H7V5M15,21H17V19H15V21M11,21H13V19H11V21M15,21H17V19H15V21M7,21H9V19H7V21M3,21H5V19H3V21M21,8A5,5 0 0,0 16,3H11V5H16A3,3 0 0,1 19,8V13H21V8Z" />

View file

@ -621,4 +621,5 @@
<string name="image_gradient">Gradient image</string>
<string name="stack">Stack</string>
<string name="grid_style_label"><![CDATA[Grids & Style]]></string>
</resources>

View file

@ -9,7 +9,6 @@
android:max="60"
android:title="@string/pref_filter_song_title"
app:enableCopying="true"
app:iconSpaceReserved="false"
app:showSeekBarValue="true" />
@ -18,23 +17,20 @@
android:key="pause_on_zero_volume"
android:summary="@string/pref_keep_pause_on_zero_volume_summary"
android:title="@string/pref_keep_pause_on_zero_volume_title"
app:enableCopying="true"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="keep_screen_on"
android:summary="@string/pref_keep_screen_on_summary"
android:title="@string/pref_keep_screen_on_title"
app:enableCopying="true"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="snow_fall_effect"
android:title="@string/pref_snow_fall_title"
app:enableCopying="true"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -5,45 +5,48 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
android:key="audio_ducking"
app:enableCopying="true"
app:iconSpaceReserved="false"
android:summary="@string/pref_summary_audio_ducking"
android:title="@string/pref_title_audio_ducking" />
android:title="@string/pref_title_audio_ducking"
app:enableCopying="true"
app:icon="@drawable/ic_volume_down_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="gapless_playback"
app:iconSpaceReserved="false"
android:summary="@string/pref_summary_gapless_playback"
android:title="@string/pref_title_gapless_playback" />
android:title="@string/pref_title_gapless_playback"
app:enableCopying="true" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
android:defaultValue="system"
app:iconSpaceReserved="false"
android:entries="@array/pref_equalizer_types_titles"
android:entryValues="@array/pref_equalizer_types_values"
android:key="choose_equalizer"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_choose_equalizer" />
android:title="@string/pref_title_choose_equalizer"
app:enableCopying="true"
app:icon="@drawable/ic_equalizer_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreference
<Preference
android:key="equalizer"
app:iconSpaceReserved="false"
android:title="@string/equalizer" />
android:title="@string/equalizer"
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="toggle_headset"
android:summary="@string/pref_summary_toggle_headset"
android:title="@string/pref_title_toggle_toggle_headset"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_play_arrow_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="toggle_shuffle"
android:summary="@string/pref_summary_toggle_shuffle"
android:title="@string/pref_title_toggle_toggle_shuffle"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_shuffle_white_24dp" />
</androidx.preference.PreferenceScreen>

View file

@ -7,7 +7,7 @@
android:key="blacklist"
android:summary="@string/pref_summary_blacklist"
android:title="@string/pref_title_blacklist"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<code.name.monkey.retromusic.preferences.MaterialListPreference
android:defaultValue="0"
android:entries="@array/pref_grid_style_list_titles"
android:entryValues="@array/pref_grid_style_list_values"
android:key="album_grid_style"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_album_grid_style"
app:iconSpaceReserved="false" />
</androidx.preference.PreferenceScreen>

View file

@ -10,7 +10,8 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_general_theme"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_color_lens_white_24dp" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/colors">
@ -19,35 +20,36 @@
android:persistent="false"
android:summary="@string/primary_color_desc"
android:title="@string/primary_color"
app:iconSpaceReserved="false"
app:isPreferenceVisible="false" />
app:enableCopying="true"
app:icon="@drawable/ic_colorize_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEColorPreference
android:key="accent_color"
android:persistent="false"
android:summary="@string/accent_color_desc"
android:title="@string/accent_color"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_colorize_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="adaptive_color_app"
android:summary="@string/pref_summary_colored_app"
android:title="@string/pref_title_colored_app"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="should_color_app_shortcuts"
android:summary="@string/pref_summary_colored_app_shortcuts"
android:title="@string/pref_title_app_shortcuts"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="dominant_color"
android:summary="@string/pref_summary_dominant_color"
android:title="@string/pref_title_toggle_dominant_color"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -3,15 +3,15 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
app:enableCopying="true"
android:defaultValue="true"
app:iconSpaceReserved="false"
android:key="ignore_media_store_artwork"
android:summary="@string/pref_summary_ignore_media_store_artwork"
android:title="@string/pref_title_ignore_media_store_artwork" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
app:enableCopying="true"
android:defaultValue="only_wifi"
app:iconSpaceReserved="false"
android:entries="@array/pref_auto_download_images_titles"
android:entryValues="@array/pref_auto_download_images_values"
android:key="auto_download_images_policy"

View file

@ -4,24 +4,24 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_lockscreen">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
app:iconSpaceReserved="false"
android:key="album_art_on_lockscreen"
android:summary="@string/pref_summary_album_art_on_lockscreen"
android:title="@string/pref_title_album_art_on_lockscreen" />
android:title="@string/pref_title_album_art_on_lockscreen"
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:dependency="album_art_on_lockscreen"
android:key="blurred_album_art"
app:iconSpaceReserved="false"
android:summary="@string/pref_summary_blurred_album_art"
android:title="@string/pref_title_blurred_album_art" />
android:title="@string/pref_title_blurred_album_art"
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
app:iconSpaceReserved="false"
android:key="lock_screen"
android:summary="@string/pref_summary_lock_screen"
android:title="@string/pref_title_lock_screen" />
android:title="@string/pref_title_lock_screen"
app:enableCopying="true" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -4,15 +4,15 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
app:iconSpaceReserved="false"
android:key="colored_notification"
android:summary="@string/pref_summary_colored_notification"
android:title="@string/pref_title_colored_notification" />
android:title="@string/pref_title_colored_notification"
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
app:iconSpaceReserved="false"
android:key="classic_notification"
android:summary="@string/pref_summary_classic_notification"
android:title="@string/pref_title_classic_notification" />
android:title="@string/pref_title_classic_notification"
app:enableCopying="true" />
</androidx.preference.PreferenceScreen>

View file

@ -5,12 +5,13 @@
<code.name.monkey.retromusic.preferences.NowPlayingScreenPreference
android:key="now_playing_screen_id"
android:title="@string/pref_title_now_playing_screen_appearance"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_play_circle_filled_white_24dp" />
<code.name.monkey.retromusic.preferences.AlbumCoverStylePreference
android:key="album_cover_style_id"
android:title="@string/pref_title_album_cover_style"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
android:defaultValue="0"
@ -18,11 +19,12 @@
android:entryValues="@array/pref_album_cover_transform_values"
android:key="album_cover_transform"
android:title="@string/pref_title_album_cover_transform"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
app:defaultValue="false"
app:iconSpaceReserved="false"
app:enableCopying="true"
app:icon="@drawable/ic_view_carousel_black_24dp"
app:key="carousel_effect"
app:summary="@string/pref_summary_carousel_effect"
app:title="@string/pref_title_toggle_carousel_effect" />
@ -30,14 +32,16 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
app:defaultValue="false"
app:iconSpaceReserved="false"
app:enableCopying="true"
app:icon="@drawable/ic_play_arrow_white_24dp"
app:key="toggle_add_controls"
app:summary="@string/pref_summary_extra_controls"
app:title="@string/pref_title_extra_controls" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
app:defaultValue="false"
app:iconSpaceReserved="false"
app:enableCopying="true"
app:icon="@drawable/ic_volume_up_white_24dp"
app:key="toggle_volume"
app:summary="@string/pref_summary_toggle_volume"
app:title="@string/pref_title_toggle_volume" />
@ -48,7 +52,8 @@
android:max="25"
android:summary="@string/pref_blur_amount_summary"
android:title="@string/pref_blur_amount_title"
app:iconSpaceReserved="false"
app:enableCopying="true"
app:icon="@drawable/ic_blur_on_white_24dp"
app:showSeekBarValue="true" />
</androidx.preference.PreferenceScreen>

View file

@ -8,10 +8,11 @@
android:entries="@array/pref_playlists_last_added_interval_titles"
android:entryValues="@array/pref_playlists_last_added_interval_values"
android:key="last_added_interval"
app:iconSpaceReserved="false"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_last_added_interval" />
android:title="@string/pref_title_last_added_interval"
app:enableCopying="true"
app:icon="@drawable/ic_playlist_add_white_24dp" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory app:title="@string/grid_style_label">
<code.name.monkey.retromusic.preferences.MaterialListPreference
android:defaultValue="0"
android:entries="@array/pref_grid_style_list_titles"
@ -10,7 +10,8 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_album_grid_style"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_album_white_24dp" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
android:defaultValue="0"
@ -20,7 +21,8 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_artist_grid_style"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_artist_white_24dp" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
@ -31,7 +33,8 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_home_artist_grid_style"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_home_white_24dp" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
android:defaultValue="0"
@ -41,13 +44,14 @@
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_tab_text_mode"
app:iconSpaceReserved="false" />
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="toggle_genre"
android:summary="@string/pref_summary_genre_toggle"
android:title="@string/pref_title_genre_toggle"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_guitar_acoustic_white_24dp" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -1,19 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/window">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
android:title="@string/window"
app:enableCopying="true"
app:iconSpaceReserved="true">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="corner_window"
android:summary="@string/pref_summary_round_corners"
android:title="@string/pref_title_round_corners"
app:iconSpaceReserved="false" />
app:enableCopying="true"
app:icon="@drawable/ic_rounded_corner" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="toggle_full_screen"
android:summary="@string/pref_summary_toggle_full_screen"
android:title="@string/pref_title_toggle_full_screen"
app:iconSpaceReserved="false" />
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
</androidx.preference.PreferenceScreen>

View file

@ -1,12 +1,13 @@
package code.name.monkey.appthemehelper.common.prefs.supportv7
import android.content.Context
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import android.graphics.PorterDuff
import android.util.AttributeSet
import android.view.View
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import code.name.monkey.appthemehelper.R
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.common.prefs.BorderCircleView
/**
@ -35,6 +36,9 @@ class ATEColorPreference(context: Context, attrs: AttributeSet?, defStyleAttr: I
layoutResource = R.layout.ate_preference_custom_support
widgetLayoutResource = R.layout.ate_preference_color
isPersistent = false
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {

View file

@ -2,10 +2,12 @@ package code.name.monkey.appthemehelper.common.prefs.supportv7
import android.annotation.TargetApi
import android.content.Context
import android.graphics.PorterDuff
import android.os.Build
import android.util.AttributeSet
import androidx.preference.CheckBoxPreference
import code.name.monkey.appthemehelper.R
import code.name.monkey.appthemehelper.ThemeStore
/**
* @author Aidan Follestad (afollestad)
@ -31,5 +33,6 @@ class ATESwitchPreference : CheckBoxPreference {
private fun init() {
widgetLayoutResource = R.layout.ate_preference_switch_support
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
}
}

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:paddingStart="72dp"
android:paddingLeft="16dp"
android:paddingTop="16dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"

View file

@ -25,7 +25,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="@dimen/ate_preference_inset"
android:layout_marginStart="32dp"
android:layout_marginLeft="@dimen/ate_preference_inset"
android:layout_marginTop="12dip"
android:layout_marginEnd="6dip"