Navigation button not updating

This commit is contained in:
Hemanth S 2020-05-24 04:57:19 +05:30
parent e59e7fbfe0
commit c923f843c0
2 changed files with 1 additions and 2 deletions

View file

@ -135,13 +135,13 @@ class MainActivity : AbsSlidingMusicPanelActivity(),
appLaunched(this) appLaunched(this)
setupToolbar() setupToolbar()
checkUpdate() checkUpdate()
updateTabs()
getBottomNavigationView().selectedItemId = PreferenceUtilKT.lastPage getBottomNavigationView().selectedItemId = PreferenceUtilKT.lastPage
getBottomNavigationView().setOnNavigationItemSelectedListener { getBottomNavigationView().setOnNavigationItemSelectedListener {
PreferenceUtilKT.lastPage = it.itemId PreferenceUtilKT.lastPage = it.itemId
selectedFragment(it.itemId) selectedFragment(it.itemId)
true true
} }
updateTabs()
} }
override fun onResume() { override fun onResume() {

View file

@ -37,7 +37,6 @@ class BottomNavigationBarTinted @JvmOverloads constructor(
init { init {
labelVisibilityMode = PreferenceUtilKT.tabTitleMode labelVisibilityMode = PreferenceUtilKT.tabTitleMode
selectedItemId = PreferenceUtilKT.lastPage
val iconColor = ATHUtil.resolveColor(context, android.R.attr.colorControlNormal) val iconColor = ATHUtil.resolveColor(context, android.R.attr.colorControlNormal)
val accentColor = ThemeStore.accentColor(context) val accentColor = ThemeStore.accentColor(context)