* Add blur to dialog for devices that support it

* More adjustable seek time

* Bump exo player
This commit is contained in:
Sadwhy 2025-01-17 13:33:01 +06:00 committed by GitHub
parent 6fa2f11db2
commit 6fd3515d2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 7 deletions

View file

@ -3,6 +3,8 @@ package ani.dantotsu.util
import android.app.Activity
import android.app.AlertDialog
import android.content.Context
import android.os.Build
import android.view.WindowManager
import android.view.View
import ani.dantotsu.R
@ -205,8 +207,14 @@ class AlertDialogBuilder(private val context: Context) {
onShow?.invoke()
}
dialog.window?.apply {
setDimAmount(0.8f)
setDimAmount(0.5f)
attributes.windowAnimations = android.R.style.Animation_Dialog
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val params = attributes
params.flags = params.flags or WindowManager.LayoutParams.FLAG_BLUR_BEHIND
params.setBlurBehindRadius(20)
attributes = params
}
}
dialog.show()
}