adding a helper function for getting bottom tab bg color
This commit is contained in:
parent
843a1f794f
commit
ef65bd8747
2 changed files with 11 additions and 0 deletions
|
@ -167,3 +167,13 @@ fun Context.toggleAppIconColor(appId: String, colorIndex: Int, color: Int, enabl
|
|||
}
|
||||
|
||||
fun Context.getAppIconColors() = resources.getIntArray(R.array.md_app_icon_colors).toCollection(ArrayList())
|
||||
|
||||
fun Context.getBottomTabsBackgroundColor(): Int {
|
||||
val baseColor = baseConfig.backgroundColor
|
||||
val bottomColor = if (baseColor == Color.WHITE) {
|
||||
resources.getColor(R.color.bottom_tabs_light_background)
|
||||
} else {
|
||||
baseConfig.backgroundColor.lightenColor(4)
|
||||
}
|
||||
return bottomColor
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<color name="divider_grey">#88808080</color>
|
||||
<color name="gradient_grey_start">#CC000000</color>
|
||||
<color name="dark_grey">#FF333333</color>
|
||||
<color name="bottom_tabs_light_background">#FFF1F1F1</color>
|
||||
|
||||
<color name="hint_white">#99FFFFFF</color>
|
||||
<color name="hint_black">#66000000</color>
|
||||
|
|
Loading…
Reference in a new issue