Checkerboard background for transparency in zoomed images #92

Merged
AmineB merged 4 commits from davidoskky/ReaderForSelfoss-multiplatform:checkerboard into master 2022-11-11 19:29:43 +00:00
Showing only changes of commit dbe97f564e - Show all commits

View File

@ -7,10 +7,13 @@ import android.view.ViewGroup
import androidx.fragment.app.Fragment
import bou.amine.apps.readerforselfossv2.android.databinding.FragmentImageBinding
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.request.RequestOptions
class ImageFragment : Fragment() {
private lateinit var imageUrl : String
private val glideOptions = RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.ALL)
private var _binding: FragmentImageBinding? = null
private val binding get() = _binding
@ -26,6 +29,8 @@ class ImageFragment : Fragment() {
binding!!.photoView.visibility = View.VISIBLE
Glide.with(activity)
.asBitmap()
.apply(glideOptions)
.load(imageUrl)
.into(binding!!.photoView)