use caching at the ImageDecoder for faster fullscreen image loading

This commit is contained in:
tibbi 2020-06-02 12:30:30 +02:00
parent c0f2f0a301
commit c5042bd89d

View file

@ -5,7 +5,6 @@ import android.graphics.Bitmap
import android.net.Uri
import com.bumptech.glide.Glide
import com.bumptech.glide.load.DecodeFormat
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.request.target.Target
import com.davemorrissey.labs.subscaleview.ImageDecoder
@ -15,7 +14,6 @@ class MyGlideImageDecoder(val degrees: Int) : ImageDecoder {
override fun decode(context: Context, uri: Uri): Bitmap {
val options = RequestOptions()
.format(DecodeFormat.PREFER_ARGB_8888)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.fitCenter()
val builder = Glide.with(context)