Is there a way to animate `Dialog` ? Like dialog e...
# compose
k
Is there a way to animate
Dialog
? Like dialog enter & exit animation with
AnimatedVisibility
or something else?
i
A Dialog is a separate Android
Window
, which means it doesn't support any kind of Compose driven animations
k
Yeah but there is still no way to get
window
from the dialog composable to set some additional properties like enter/exit Transition!
d
You probably want a popup instead. Just draw a card above everything with a shadow.
👍 3
c
@Dominaezzz is popup a composable or something? Never heard of it? Or are you saying create a popup like this Box{ MyActualLayout() MyCustomPopUpWithASemiTransparentBackgroundSoThatItMimicsADialog() }
d
Popup is a desktop composable but it can be emulated like you've done.
👍 1
d
You could do something like this: https://issuetracker.google.com/issues/182551467#comment5 The idea is to animate the enter/exit of the content of the Popup, so that the container Popup gets a derived animation.