Fixed Material you for all activities
This commit is contained in:
parent
72a11495fa
commit
ba69813ff3
1 changed files with 6 additions and 1 deletions
|
@ -37,6 +37,7 @@ import code.name.monkey.retromusic.extensions.surfaceColor
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.RetroUtil
|
import code.name.monkey.retromusic.util.RetroUtil
|
||||||
import code.name.monkey.retromusic.util.theme.ThemeManager
|
import code.name.monkey.retromusic.util.theme.ThemeManager
|
||||||
|
import com.google.android.material.color.DynamicColors
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
||||||
|
@ -52,12 +53,16 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
||||||
toggleScreenOn()
|
toggleScreenOn()
|
||||||
setDrawUnderNavigationBar()
|
setDrawUnderNavigationBar()
|
||||||
setLightNavigationAuto()
|
setLightNavigationAuto()
|
||||||
//MaterialDialogsUtil.updateMaterialDialogsThemeSingleton(this)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateTheme() {
|
private fun updateTheme() {
|
||||||
setTheme(ThemeManager.getThemeResValue(this))
|
setTheme(ThemeManager.getThemeResValue(this))
|
||||||
setDefaultNightMode(ThemeManager.getNightMode(this))
|
setDefaultNightMode(ThemeManager.getNightMode(this))
|
||||||
|
|
||||||
|
// Apply dynamic colors to activity if enabled
|
||||||
|
if (PreferenceUtil.materialYou) {
|
||||||
|
DynamicColors.applyIfAvailable(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun toggleScreenOn() {
|
private fun toggleScreenOn() {
|
||||||
|
|
Loading…
Reference in a new issue