Animated Dialog
fun AnimatedDialog(visible: Boolean, onDismissRequest: () -> Unit, enter: EnterTransition = fadeIn(), exit: ExitTransition = fadeOut(), dismissOnBackPress: Boolean = true, @FloatRange(from = 0.0, to = 1.0 ) dimAmount: Float = 0.6f, contentAlignment: Alignment = Alignment.TopStart, content: @Composable AnimatedVisibilityScope.() -> Unit)
动画对话框:主要是在Dialog的基础之上增加了可见性过渡动画,并解决Dialog的宽度显示问题;
Author
Parameters
visible
是否显示对话框
on Dismiss Request
关闭对话框;当用户试图关闭对话框时,会执行此函数
enter
对话框显示时的入场动画
exit
对话框消失时的退场动画
dismiss On Back Press
是否可以系统返回键来关闭对话框;默认为:true
dim Amount
对话框背景蒙层;范围从:1.0(不透明)到 0.0(完全透明);默认为:0.6
content Alignment
对话框内容的对齐方式;默认为:Alignment.TopStart
content
对话框的内容