mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 10:27:39 +00:00
Fixed bottom navigation popping up when it shouldn't
This commit is contained in:
parent
9e3afcfe7a
commit
f6061ba00e
@ -84,6 +84,11 @@ open class MainActivity : CompatActivity<MainViewModel, ActivityMainMd2Binding>(
|
||||
if (intent.getBooleanExtra(Const.Key.OPEN_SETTINGS, false)) {
|
||||
binding.mainNavigation.selectedItemId = R.id.settingsFragment
|
||||
}
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
onTabTransaction(null, -1)
|
||||
onFragmentTransaction(null, FragNavController.TransactionType.PUSH)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
@ -128,8 +133,8 @@ open class MainActivity : CompatActivity<MainViewModel, ActivityMainMd2Binding>(
|
||||
binding.mainBottomBar.animate()
|
||||
.translationY(translation.toFloat())
|
||||
.setInterpolator(FastOutSlowInInterpolator())
|
||||
.withStartAction { if (translation == 0) binding.mainBottomBar.isVisible = true }
|
||||
.withEndAction { if (translation > 0) binding.mainBottomBar.isVisible = false }
|
||||
.withStartAction { if (navigation.isRoot) binding.mainBottomBar.isVisible = true }
|
||||
.withEndAction { if (!navigation.isRoot) binding.mainBottomBar.isVisible = false }
|
||||
.start()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user