simplify bottom tab holder bg color setting

This commit is contained in:
tibbi
2022-06-24 17:49:34 +02:00
parent ea27b1c4bf
commit c0372ecbc1
2 changed files with 4 additions and 10 deletions

View File

@@ -61,6 +61,6 @@ android {
} }
dependencies { dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:ac7e52249a' implementation 'com.github.SimpleMobileTools:Simple-Commons:b45fde5669'
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
} }

View File

@@ -248,15 +248,9 @@ class MainActivity : SimpleActivity() {
updateBottomTabItemColors(inactiveView, false) updateBottomTabItemColors(inactiveView, false)
} }
if (baseConfig.isUsingSystemTheme) { val bottomBarColor = getBottomTabsBackgroundColor()
val bottomBarColor = resources.getColor(R.color.you_status_bar_color, theme)
main_tabs_holder.setBackgroundColor(bottomBarColor) main_tabs_holder.setBackgroundColor(bottomBarColor)
updateNavigationBarColor(bottomBarColor) updateNavigationBarColor(bottomBarColor)
} else {
val bottomBarColor = config.backgroundColor.lightenColor(4)
main_tabs_holder.setBackgroundColor(bottomBarColor)
updateNavigationBarColor(bottomBarColor)
}
} }
private fun getInactiveTabIndexes(activeIndex: Int) = (0 until tabsList.size).filter { it != activeIndex } private fun getInactiveTabIndexes(activeIndex: Int) = (0 until tabsList.size).filter { it != activeIndex }