fix a glitch at handling the accent color picker at the Customization screen
This commit is contained in:
parent
c2fc857ddc
commit
84ec44d781
2 changed files with 7 additions and 3 deletions
|
@ -6,7 +6,7 @@ buildscript {
|
|||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.34.0'
|
||||
propVersionName = '5.34.1'
|
||||
kotlin_version = '1.4.31'
|
||||
}
|
||||
|
||||
|
|
|
@ -406,14 +406,18 @@ class CustomizationActivity : BaseSimpleActivity() {
|
|||
}
|
||||
|
||||
private fun handleAccentColorLayout() {
|
||||
customization_accent_color_holder.beVisibleIf(curSelectedThemeId == THEME_WHITE || isWhiteTheme() || curSelectedThemeId == THEME_BLACK_WHITE || isBlackAndWhiteTheme())
|
||||
customization_accent_color_label.text = getString(if (curSelectedThemeId == THEME_WHITE || isWhiteTheme()) {
|
||||
customization_accent_color_holder.beVisibleIf(curSelectedThemeId == THEME_WHITE || isCurrentWhiteTheme() || curSelectedThemeId == THEME_BLACK_WHITE || isCurrentBlackAndWhiteTheme())
|
||||
customization_accent_color_label.text = getString(if (curSelectedThemeId == THEME_WHITE || isCurrentWhiteTheme()) {
|
||||
R.string.accent_color_white
|
||||
} else {
|
||||
R.string.accent_color_black_and_white
|
||||
})
|
||||
}
|
||||
|
||||
private fun isCurrentWhiteTheme() = curTextColor == DARK_GREY && curPrimaryColor == Color.WHITE && curBackgroundColor == Color.WHITE
|
||||
|
||||
private fun isCurrentBlackAndWhiteTheme() = curTextColor == Color.WHITE && curPrimaryColor == Color.BLACK && curBackgroundColor == Color.BLACK
|
||||
|
||||
private fun pickTextColor() {
|
||||
ColorPickerDialog(this, curTextColor) { wasPositivePressed, color ->
|
||||
if (wasPositivePressed) {
|
||||
|
|
Loading…
Reference in a new issue