Revert imageview changes
This commit is contained in:
parent
3a3bf03114
commit
dbe97f564e
@ -7,10 +7,13 @@ import android.view.ViewGroup
|
|||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import bou.amine.apps.readerforselfossv2.android.databinding.FragmentImageBinding
|
import bou.amine.apps.readerforselfossv2.android.databinding.FragmentImageBinding
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
|
import com.bumptech.glide.request.RequestOptions
|
||||||
|
|
||||||
class ImageFragment : Fragment() {
|
class ImageFragment : Fragment() {
|
||||||
|
|
||||||
private lateinit var imageUrl : String
|
private lateinit var imageUrl : String
|
||||||
|
private val glideOptions = RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.ALL)
|
||||||
private var _binding: FragmentImageBinding? = null
|
private var _binding: FragmentImageBinding? = null
|
||||||
private val binding get() = _binding
|
private val binding get() = _binding
|
||||||
|
|
||||||
@ -26,6 +29,8 @@ class ImageFragment : Fragment() {
|
|||||||
|
|
||||||
binding!!.photoView.visibility = View.VISIBLE
|
binding!!.photoView.visibility = View.VISIBLE
|
||||||
Glide.with(activity)
|
Glide.with(activity)
|
||||||
|
.asBitmap()
|
||||||
|
.apply(glideOptions)
|
||||||
.load(imageUrl)
|
.load(imageUrl)
|
||||||
.into(binding!!.photoView)
|
.into(binding!!.photoView)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user