Chris Johnson
07/26/2023, 11:17 PMPaddingValues.calculateBottomPadding
finishes updating. So it looks like The content of the bottomNav animates down but there's now a blank white Bar where the bottom nav used to be for about 1 second. (This is the padding lagging behind). Is there a way to animate the bottom bar to be gone alongside the padding on the wrapped NavHost? Or should I apply the bottomBar padding to every top level composable?Stylianos Gakis
07/26/2023, 11:25 PMcalculateBottomPadding
returns the same value while the BottomNav (which consumes the insets when it exists) is animating out, and the moment it’s animated away, it no longer consumes those insets and then those children can use that padding.
Do I understand this right?Chris Johnson
07/27/2023, 4:53 PMcalculateBottomPadding
value based on its height. Since it animates out and changes its height to 0 then calculateBottomPadding
changes to 0 eventually. The issue is that the bottomNav animates first, but calculateBottomPadding
will run afterwards so you're left with a blank white space where the BottomNav used to be for a second. I'll see if I can take a pictureAlan Mechoulam
07/27/2023, 6:56 PMmodifier =
if (isBottomBarDestination || !bottomBarTransitionState.isIdle)
Modifier
else
Modifier.padding(paddingValues)
Hope this helps!Chris Johnson
07/27/2023, 7:13 PMMutableTransitionState
. That does indeed solve the blank white space left behind by padding gratitude thank you . After you do this though it looks like when you navigate your composable 'jitters' for a second. This is because we're changing viewport's size it's being displayed in so after the size changes it then resizes which looks wonky.. does this not happen for you?Chris Johnson
07/27/2023, 7:22 PMStylianos Gakis
07/27/2023, 7:25 PMhedvigAppState.shouldShowBottomBar
. so as that changes and the bar animates out, I'm also animating the amount of insets that we're consuming. As that is animated, the content doesn't jump anywhere, the bottom nav animates down while at the same time we're giving more of the insets back to the content which would animate them up, together they make this transition smooth.Chris Johnson
07/27/2023, 7:30 PMStylianos Gakis
07/27/2023, 7:39 PMStylianos Gakis
07/27/2023, 7:39 PMChris Johnson
07/27/2023, 7:39 PMAlan Mechoulam
07/27/2023, 7:39 PMStylianos Gakis
07/27/2023, 7:40 PMChris Johnson
07/27/2023, 7:42 PMValentin Gusselnikov
07/27/2023, 8:05 PMStylianos Gakis
07/27/2023, 8:23 PM