[Themes & Styles] Code cleanup
This commit is contained in:
parent
36c94a9813
commit
874e8df94c
9 changed files with 13 additions and 32 deletions
|
@ -81,7 +81,6 @@ class SettingsActivity : AbsThemeActivity(), ColorCallback, OnThemeChangedListen
|
|||
ThemeStore.editTheme(this).accentColor(color).commit()
|
||||
if (VersionUtils.hasNougatMR())
|
||||
DynamicShortcutManager(this).updateDynamicShortcuts()
|
||||
|
||||
restart()
|
||||
}
|
||||
|
||||
|
|
|
@ -28,10 +28,8 @@ object ThemeManager {
|
|||
fun getNightMode(
|
||||
context: Context
|
||||
): Int = when (context.generalThemeValue) {
|
||||
LIGHT -> AppCompatDelegate.MODE_NIGHT_NO
|
||||
DARK,
|
||||
BLACK -> AppCompatDelegate.MODE_NIGHT_YES
|
||||
AUTO -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
|
||||
DARK -> AppCompatDelegate.MODE_NIGHT_YES
|
||||
else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,13 +16,11 @@ package code.name.monkey.retromusic.views
|
|||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.util.AttributeSet
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.NavigationViewUtil
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
|
||||
|
@ -49,7 +47,6 @@ class BottomNavigationBarTinted @JvmOverloads constructor(
|
|||
accentColor
|
||||
)
|
||||
itemRippleColor = ColorStateList.valueOf(accentColor.addAlpha(0.08F))
|
||||
background = ColorDrawable(ATHUtil.resolveColor(context, R.attr.bottomSheetTint))
|
||||
itemActiveIndicatorColor = ColorStateList.valueOf(accentColor.addAlpha(0.12F))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue