修复隐藏底部导航栏无效的问题
This commit is contained in:
1 file changed
+6
-4
@@ -351,10 +351,6 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
|
|||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 控制显隐
|
|
||||||
binding.navigationRailView.isVisible = useRail
|
|
||||||
binding.bottomNavigationView.isVisible = !useRail
|
|
||||||
|
|
||||||
return if (useRail) binding.navigationRailView else binding.bottomNavigationView
|
return if (useRail) binding.navigationRailView else binding.bottomNavigationView
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -382,7 +378,13 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
|
|||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
|
|
||||||
if (AppConfig.showBottomView) {
|
if (AppConfig.showBottomView) {
|
||||||
|
val navView = getNavigationBarView()
|
||||||
navView.visible()
|
navView.visible()
|
||||||
|
if (navView === binding.bottomNavigationView) {
|
||||||
|
binding.navigationRailView.gone()
|
||||||
|
} else {
|
||||||
|
binding.bottomNavigationView.gone()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.bottomNavigationView.gone()
|
binding.bottomNavigationView.gone()
|
||||||
binding.navigationRailView.gone()
|
binding.navigationRailView.gone()
|
||||||
|
|||||||
Reference in new issue
Block a user