From c0372ecbc1470a16c4bc1f40711785afa8ce8143 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 24 Jun 2022 17:49:34 +0200 Subject: [PATCH] simplify bottom tab holder bg color setting --- app/build.gradle | 2 +- .../dialer/activities/MainActivity.kt | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e9f600b2..af6da3ce 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,6 +61,6 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:ac7e52249a' + implementation 'com.github.SimpleMobileTools:Simple-Commons:b45fde5669' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' } diff --git a/app/src/main/kotlin/com/simplemobiletools/dialer/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/dialer/activities/MainActivity.kt index c58b65ff..8f7cec4e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/dialer/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/dialer/activities/MainActivity.kt @@ -248,15 +248,9 @@ class MainActivity : SimpleActivity() { updateBottomTabItemColors(inactiveView, false) } - if (baseConfig.isUsingSystemTheme) { - val bottomBarColor = resources.getColor(R.color.you_status_bar_color, theme) - main_tabs_holder.setBackgroundColor(bottomBarColor) - updateNavigationBarColor(bottomBarColor) - } else { - val bottomBarColor = config.backgroundColor.lightenColor(4) - main_tabs_holder.setBackgroundColor(bottomBarColor) - updateNavigationBarColor(bottomBarColor) - } + val bottomBarColor = getBottomTabsBackgroundColor() + main_tabs_holder.setBackgroundColor(bottomBarColor) + updateNavigationBarColor(bottomBarColor) } private fun getInactiveTabIndexes(activeIndex: Int) = (0 until tabsList.size).filter { it != activeIndex }