use proper status bar color at B&W and W themes
This commit is contained in:
parent
b264da6cff
commit
7fc7d4d090
2 changed files with 7 additions and 2 deletions
|
@ -104,7 +104,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() {
|
|||
val color = if (baseConfig.isUsingSystemTheme) {
|
||||
resources.getColor(R.color.you_status_bar_color)
|
||||
} else {
|
||||
getProperPrimaryColor()
|
||||
getProperStatusBarColor()
|
||||
}
|
||||
|
||||
updateActionbarColor(color)
|
||||
|
@ -155,7 +155,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
fun updateActionbarColor(color: Int = getProperPrimaryColor()) {
|
||||
fun updateActionbarColor(color: Int = getProperStatusBarColor()) {
|
||||
updateActionBarTitle(supportActionBar?.title.toString(), color)
|
||||
supportActionBar?.setBackgroundDrawable(ColorDrawable(color))
|
||||
updateStatusbarColor(color)
|
||||
|
|
|
@ -31,6 +31,11 @@ fun Context.getProperPrimaryColor() = when {
|
|||
else -> baseConfig.primaryColor
|
||||
}
|
||||
|
||||
fun Context.getProperStatusBarColor() = when {
|
||||
baseConfig.isUsingSystemTheme -> resources.getColor(R.color.you_primary_color, theme)
|
||||
else -> baseConfig.primaryColor
|
||||
}
|
||||
|
||||
fun Context.updateTextColors(viewGroup: ViewGroup) {
|
||||
val textColor = when {
|
||||
baseConfig.isUsingSystemTheme -> getProperTextColor()
|
||||
|
|
Loading…
Reference in a new issue