Added ability to extract accent color from wallpaper on 8.1+ devices
This commit is contained in:
parent
09ad243a14
commit
9d1018c03c
16 changed files with 117 additions and 6 deletions
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
package code.name.monkey.retromusic.fragments.settings
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import androidx.preference.Preference
|
||||
|
@ -37,6 +38,7 @@ import com.google.android.material.color.DynamicColors
|
|||
*/
|
||||
|
||||
class ThemeSettingsFragment : AbsSettingsFragment() {
|
||||
@SuppressLint("CheckResult")
|
||||
override fun invalidateSettings() {
|
||||
val generalTheme: Preference? = findPreference(GENERAL_THEME)
|
||||
generalTheme?.let {
|
||||
|
@ -121,6 +123,11 @@ class ThemeSettingsFragment : AbsSettingsFragment() {
|
|||
restartActivity()
|
||||
true
|
||||
}
|
||||
val wallpaperAccent: ATESwitchPreference? = findPreference(WALLPAPER_ACCENT)
|
||||
wallpaperAccent?.setOnPreferenceChangeListener { _, _ ->
|
||||
restartActivity()
|
||||
true
|
||||
}
|
||||
val customFont: ATESwitchPreference? = findPreference(CUSTOM_FONT)
|
||||
customFont?.setOnPreferenceChangeListener { _, _ ->
|
||||
restartActivity()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue