<https://stackoverflow.com/questions/74925228/how-...
# compose
s
c
Well, I don't see what's related. How can I use it?
I'd like to use dialog with navigation.
i
As mentioned as a comment on that question:
Dialogs are separate Android windows, they don't respect any animations you set in Compose. That is true with or without Navigation. That's why
Dialog
itself has no animation properties.
If
Dialog
doesn't allow you to add animations, layers like Navigation built in top of those basic components can't work around those limitations
c
Well, I am not using Dialog. But
NavGraphBuilder.dialog{}
.
I don't get,
they don't respect any animations you set in Compose
. this part. Why don't they...?
i
Well, I am not using Dialog. But NavGraphBuilder.dialog() .
And what do you think
NavGraphBuilder.dialog()
uses? It is just a wrapper around
Dialog
I don't get, they don't respect any animations you set in Compose. this part. Why don't they...?
An Android Activity and an Android Dialog are part of the Android framework - they know nothing about Compose or its animation system
So just like how you can't start an Android Activity and expect it to use Compose's animation system to control how the Activity appears, an Android Dialog also can't use Compose's animation system to animate it in or out - you have to use the Android framework tools available to you (which are extremely limited, tbh)