Is there a way to have a compose destination have ...
# compose
c
Is there a way to have a compose destination have a transparent look to it? I.e I want the current destination to be see through so it can see the screen below it. (But I don't want it to be a dialog)
z
give it an
alpha
modifier?
s
Assuming you're talking about androidx.navigation, the answer is probably no though, since it uses AnimatedContent https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:navigati[…]n/java/androidx/navigation/compose/NavHost.kt;l=646?q=NavHost to render the current screen. The previous screen should no longer be in composition and rendering when the navigation animation finishes.
c
Yeah I tried alpha, etc but it's still solid. Sounds like dialogs are handled differently which is why they're able to show the previous destination on the stack. I'm currently using compose destinations but it should be the same under the hood. I guess a better question would be is there a way to style your composable backstackentry to mimick a dialog's window properties?
s
Multiple resumed destinations reminded me of this conversation here btw https://androiddev.social/@ianlake/113323730676796313 it might look interesting to you. Otherwise I really feel like you aren't gonna get far with normal androidx.compose destinations being visible (not during an animation) at the same time. You gotta have a custom NavHost + Navigator which can let you do all that.
fist bump 1
i
AnimatedContent
in its settled state only allows one destination to be visible at all, so no, you can't have two normal destinations displayed at the same time
👍 1
But you're better asking in the dedicated channel: #C06CS4UCQ10
c
Thanks for the responses guys. We might have to do the custom NavHost option. The main reason I asked was because in Android 15 dialogs don't seem to respect insets with edgeToEdge enabled (at least in our app). So I was looking for a solution to make a screen appear as though it's a dialog. I'd prefer this screen not be a dialog anyway
i
c
Nice! Would you be able to tell me what release this would be in?
i
Should be in next week's release
🐐 2
blob ty sign 2