* 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

@ -113,7 +113,7 @@ dependencies {
implementation 'jp.wasabeef:glide-transformations:4.3.0'
// Exoplayer
ext.exo_version = '1.5.0'
ext.exo_version = '1.5.1'
implementation "androidx.media3:media3-exoplayer:$exo_version"
implementation "androidx.media3:media3-ui:$exo_version"
implementation "androidx.media3:media3-exoplayer-hls:$exo_version"
@ -124,7 +124,7 @@ dependencies {
implementation "androidx.media3:media3-cast:$exo_version"
implementation "androidx.mediarouter:mediarouter:1.7.0"
// Media3 extension
implementation "com.github.anilbeesetti.nextlib:nextlib-media3ext:0.8.3"
implementation "com.github.anilbeesetti.nextlib:nextlib-media3ext:0.8.4"
// UI
implementation 'com.google.android.material:material:1.12.0'

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

View file

@ -1102,10 +1102,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="32dp"
android:stepSize="5.0"
android:value="15.0"
android:valueFrom="5.0"
android:valueTo="45.0"
android:stepSize="1.0"
android:value="10.0"
android:valueFrom="1.0"
android:valueTo="50.0"
app:labelBehavior="floating"
app:labelStyle="@style/fontTooltip"
app:thumbColor="?attr/colorSecondary"