nlindberg
11/16/2022, 4:59 PMdorche
11/16/2022, 5:40 PMScaffold(
bottomBar = if (navController.currentDestination.showBottomBar) {....}
...
) {
// NavHost here etc
}
Now what this means is that the NavHost will have a different height on the screens that have a bottom bar vs the ones that don't.
Which itself suggests to me that when you try to navigate from the screen that has a bottom nav to the one that doesn't, the navigation animation is started (think e.g. slideInFromRight) the screen will resize which makes it "jump" and I hate it.dorche
11/16/2022, 5:45 PMnlindberg
11/16/2022, 5:58 PMnlindberg
11/16/2022, 5:59 PMdorche
11/16/2022, 6:32 PMnlindberg
11/16/2022, 6:43 PMdorche
11/16/2022, 6:49 PMIan Lake
11/16/2022, 7:02 PMnlindberg
11/16/2022, 7:19 PMIan Lake
11/16/2022, 7:26 PMAnimatedContent
- it has to either be within the AnimatedContent
(and therefore the transitions you apply to everything in the screen) or it has to be lifted outside the AnimatedContent
if it actually needs to stay where it is as the content changesStylianos Gakis
04/07/2024, 1:08 PM.sharedElement
modfier and simply adding the same key in rememberSharedContentState
.
This is a video of this in action https://x.com/GakisStylianos/status/1776910738616959118.Lasse Magnussen
04/10/2024, 5:36 PMSharedToolbar
composable that did magic to instantiate only 1 toolbar and use this across the various screens. This worked, but it was always supposed to be a stop-gap solution until something like .sharedElement
was in place.
So my quick attempt simply re-did some of the SharedToolbar
and I had to leverage context receivers to ease my migration burden. Which mostly involved slapping it on every navgraph builder.
But after compiling, fixing all minor compile errors — it just worked. A shared toolbar that stays in place; but animates left-right when it first becomes visible, but simply changes on subsequent screens.
Well that was easy. Sure we’ll clean this up in the future. Likely we’ll unroll the SharedToolbar
composable to give more control.
But wow, amazing work! Thanks @Doris Liu and everyone involved! Keep it up!Stylianos Gakis
04/10/2024, 5:37 PMit just workedHell yeah. I had the exact same reaction to this 😅
Doris Liu
04/10/2024, 6:25 PMsharedBounds
a try. 😉Archie
03/31/2025, 8:51 PMStylianos Gakis
03/31/2025, 10:22 PMArchie
04/01/2025, 5:32 PM