mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 12:49:18 +01:00
MainActivity: Show bottom nav when the tab page is changed (#4914)
* MainActivity: Show bottom nav when the tab page is changed
* Revert "MainActivity: Show bottom nav when the tab page is changed"
This reverts commit 27fd73db
* MainActivity: Show bottom nav when the app bar is fully expanded
This commit is contained in:
parent
41a747c7e7
commit
d0bf93ebb7
@ -130,6 +130,15 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
|||||||
tabAnimator = ViewHeightAnimator(binding.tabs, 0L)
|
tabAnimator = ViewHeightAnimator(binding.tabs, 0L)
|
||||||
bottomNavAnimator = ViewHeightAnimator(binding.bottomNav)
|
bottomNavAnimator = ViewHeightAnimator(binding.bottomNav)
|
||||||
|
|
||||||
|
// If bottom nav is hidden, make it visible again when the app bar is expanded
|
||||||
|
binding.appbar.addOnOffsetChangedListener(
|
||||||
|
AppBarLayout.OnOffsetChangedListener { _, verticalOffset ->
|
||||||
|
if (verticalOffset == 0) {
|
||||||
|
showBottomNav(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
// Set behavior of bottom nav
|
// Set behavior of bottom nav
|
||||||
preferences.hideBottomBar()
|
preferences.hideBottomBar()
|
||||||
.asImmediateFlow { setBottomNavBehaviorOnScroll() }
|
.asImmediateFlow { setBottomNavBehaviorOnScroll() }
|
||||||
|
Loading…
Reference in New Issue
Block a user