I'm using navigation-compose. Is there any way to ...
# compose-android
c
I'm using navigation-compose. Is there any way to have one of my destinations to have a background of Blue with alpha 0.5F so that I can see the screen under it?
y
I assume the NavHost decides this if the back route is compose as well, not another activity.
On Wear, the SwipeDismissableNavHost has a foreground/background. But background is only composed and drawn while you are swiping. In normal situations it isn't actually composed at all.
Mobile might be very different.
i
Dialog destinations or any destination type that marks itself with the
FloatingWindow
interface (such as bottom sheet destinations in Material) allow the underlying destination to still be composed underneath that destination
1
But no, a
composable
destination is removed from composition when another
composable
destination is on top of it (unless you're doing a transition between destinations ala predictive back transitions, where both destinations are temporarily both in composition)
c
Interesting. so I guess I could try to come up with my own destination (like translucentComposable() or something) and just mark it as FloatingWindow? Let me give that a whirl. Thanks for confirming!
oh. actually. i think i can just use dialog as a destination and try to set that full screen. I tried peeking at bottomSheet and dialog destinations code but didn't see anything too obvious on how to enable floatingWindow mode
yep. dialog worked lol. insets are a little weird. but shippable. awesome