stuff (#567)
* Add blur to dialog for devices that support it * More adjustable seek time * Bump exo player
This commit is contained in:
parent
6fa2f11db2
commit
6fd3515d2c
3 changed files with 15 additions and 7 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue