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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()
}
}