OG
12/14/2021, 6:50 AMJason Ankers
12/14/2021, 7:18 AMLibor Bicanovsky
12/14/2021, 7:34 AMOG
12/14/2021, 1:00 PMIan Lake
12/14/2021, 2:11 PMOG
12/14/2021, 4:09 PMvisibleEntries
API is helpful.
By "jump" animation, what I meant was without this new API you pointed out, you could hide the bottom bar based on the current navigation route from the existing currentBackStackEntryAsState())
.
So if A,B,C were composables that were shown for a respective bottom navigation tab, and F was a fullscreen composable, then only after F was rendered would the bottom navigation disappear, and then F would recompose/remeasure to fill the space the bottom bar was previously taking.
Now with your example in that GitHub thread with visibleEntries
it seems once F completed it's enter animation, you could then animate out the bottom bar using Animated visibility, but the "jump" would still happen (I think?) Because F would then recompose to fill the space previously occupied by the bottom bar, giving this "jump" effect (my poor choice of naming here haha)
Unless, if I am understanding correctly, I could use visibleEntries,
And animate away the bottom bar as soon as I know A,B or C is beginning to exit and F is beginning to enter..Ian Lake
12/14/2021, 5:05 PMAnimatedVisilbility
include shrinkOut
, which would smoothly animate the bar out and smoothly resize the content. You'd have to go out of your way to have jump cuts in ComposecurrentBackStackEntryAsState()
is already enough. It is only if you want staggered animations (i.e., wait for one to finish before starting the next) that you'd need the deeper level signal you get from visibleEntries
OG
12/14/2021, 5:26 PM