mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 14:51:50 +01:00
Adding blur to manga details' backdrop
This commit is contained in:
parent
6d6ac4df05
commit
075961314f
@ -4,6 +4,9 @@ import android.annotation.SuppressLint
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.view.LayoutInflater
|
||||
import android.graphics.RenderEffect
|
||||
import android.graphics.Shader
|
||||
import android.os.Build
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@ -28,7 +31,7 @@ import eu.kanade.tachiyomi.util.system.isLTR
|
||||
import eu.kanade.tachiyomi.util.view.resetStrokeColor
|
||||
import eu.kanade.tachiyomi.util.view.updateLayoutParams
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@SuppressLint("ClickableViewAccessibility", "NewApi")
|
||||
class MangaHeaderHolder(
|
||||
view: View,
|
||||
private val adapter: MangaDetailsAdapter,
|
||||
@ -124,6 +127,15 @@ class MangaHeaderHolder(
|
||||
)
|
||||
true
|
||||
}
|
||||
if (Build.VERSION.PREVIEW_SDK_INT + Build.VERSION.SDK_INT >= 31) {
|
||||
backdrop.setRenderEffect(
|
||||
RenderEffect.createBlurEffect(
|
||||
10f,
|
||||
10f,
|
||||
Shader.TileMode.MIRROR
|
||||
)
|
||||
)
|
||||
}
|
||||
mangaCover.setOnClickListener { adapter.delegate.zoomImageFromThumb(coverCard) }
|
||||
trackButton.setOnClickListener { adapter.delegate.showTrackingSheet() }
|
||||
if (startExpanded) expandDesc()
|
||||
|
Loading…
Reference in New Issue
Block a user