https://kotlinlang.org logo
#compose
Title
# compose
a

Akram Bensalem

07/06/2022, 4:43 PM
Is there any trick or way to use nested navigation with some sharable UI content ? Fir example in my case I want all the :
Copy code
policyGraph()
contactUsGraph()
aboutUsGraph()
conditionOfUseGraph()
share the same "Custom Parent Layout" but the other graphs do not share that layout ?
i

Ian Lake

07/06/2022, 6:14 PM
We talked about this recently as well as the long term vision for these types of UI that is shared across multiple destinations: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1654836389534839?thread_ts=1654793995.106589&cid=CJLTWPH7S
But right now, that shared content would need to be hoisted up out of the
NavHost
(just like any other shared UI, probably using
AnimatedVisibility
+ looking at the currentBackStackEntry and its
hierarchy
to determine if you are in a particular graph to know when that UI should be visible or not
d

dewildte

07/06/2022, 8:52 PM
I am experimenting with what it would take to have a single Scaffold for the entire app that responds to screen changes. I imagine it will be a lot of work and infrastructure but I believe I could make beautifully animated screen transitions.
♥️ 1
l

Lasse Magnussen

07/08/2022, 11:46 AM
I just have to ask, what is
Modifier.sharedElement
and where does it exist? I mean, it’s referred to as the secret sauce and that seems to be oh so true.
i

Ian Lake

07/08/2022, 1:58 PM
The "in a shared element based world" doesn't exist yet - it is referring to the future state
👍 1
5 Views