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

Kaustubh Patange

08/21/2021, 2:01 PM
Is there a way to animate
Dialog
? Like dialog enter & exit animation with
AnimatedVisibility
or something else?
i

Ian Lake

08/21/2021, 2:16 PM
A Dialog is a separate Android
Window
, which means it doesn't support any kind of Compose driven animations
k

Kaustubh Patange

08/21/2021, 2:45 PM
Yeah but there is still no way to get
window
from the dialog composable to set some additional properties like enter/exit Transition!
d

Dominaezzz

08/21/2021, 3:36 PM
You probably want a popup instead. Just draw a card above everything with a shadow.
👍 3
c

Colton Idle

08/21/2021, 4:42 PM
@Dominaezzz is popup a composable or something? Never heard of it? Or are you saying create a popup like this Box{ MyActualLayout() MyCustomPopUpWithASemiTransparentBackgroundSoThatItMimicsADialog() }
d

Dominaezzz

08/21/2021, 5:05 PM
Popup is a desktop composable but it can be emulated like you've done.
👍 1
d

Doris Liu

08/21/2021, 5:22 PM
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.
16 Views