mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 10:37: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)) {
|
if (intent.getBooleanExtra(Const.Key.OPEN_SETTINGS, false)) {
|
||||||
binding.mainNavigation.selectedItemId = R.id.settingsFragment
|
binding.mainNavigation.selectedItemId = R.id.settingsFragment
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (savedInstanceState != null) {
|
||||||
|
onTabTransaction(null, -1)
|
||||||
|
onFragmentTransaction(null, FragNavController.TransactionType.PUSH)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
@ -128,8 +133,8 @@ open class MainActivity : CompatActivity<MainViewModel, ActivityMainMd2Binding>(
|
|||||||
binding.mainBottomBar.animate()
|
binding.mainBottomBar.animate()
|
||||||
.translationY(translation.toFloat())
|
.translationY(translation.toFloat())
|
||||||
.setInterpolator(FastOutSlowInInterpolator())
|
.setInterpolator(FastOutSlowInInterpolator())
|
||||||
.withStartAction { if (translation == 0) binding.mainBottomBar.isVisible = true }
|
.withStartAction { if (navigation.isRoot) binding.mainBottomBar.isVisible = true }
|
||||||
.withEndAction { if (translation > 0) binding.mainBottomBar.isVisible = false }
|
.withEndAction { if (!navigation.isRoot) binding.mainBottomBar.isVisible = false }
|
||||||
.start()
|
.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user