Fixed Material you for all activities

This commit is contained in:
Prathamesh More 2021-10-05 16:23:09 +05:30
parent 72a11495fa
commit ba69813ff3

View file

@ -37,6 +37,7 @@ import code.name.monkey.retromusic.extensions.surfaceColor
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.RetroUtil
import code.name.monkey.retromusic.util.theme.ThemeManager
import com.google.android.material.color.DynamicColors
import java.util.*
abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
@ -52,12 +53,16 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
toggleScreenOn()
setDrawUnderNavigationBar()
setLightNavigationAuto()
//MaterialDialogsUtil.updateMaterialDialogsThemeSingleton(this)
}
private fun updateTheme() {
setTheme(ThemeManager.getThemeResValue(this))
setDefaultNightMode(ThemeManager.getNightMode(this))
// Apply dynamic colors to activity if enabled
if (PreferenceUtil.materialYou) {
DynamicColors.applyIfAvailable(this)
}
}
private fun toggleScreenOn() {