Add animation to dialog

This commit is contained in:
Sadwhy
2024-12-11 13:40:08 +06:00
committed by GitHub
parent d1400ff422
commit 6d32900568

View File

@@ -181,7 +181,10 @@ class AlertDialogBuilder(private val context: Context) {
dialog.setOnShowListener {
onShow?.invoke()
}
dialog.window?.setDimAmount(0.8f)
dialog.window?.apply {
setDimAmount(0.8f)
attributes.windowAnimations = android.R.style.Animation_Dialog
}
dialog.show()
}
}