From 3a3bf0311499136133d7f482b572d85f4314af9a Mon Sep 17 00:00:00 2001 From: aminecmi Date: Thu, 10 Nov 2022 21:41:55 +0100 Subject: [PATCH] Bigger checktile. --- .../android/fragments/ImageFragment.kt | 17 +---------------- androidApp/src/main/res/drawable/checktile.png | Bin 98 -> 235 bytes .../src/main/res/layout/fragment_image.xml | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ImageFragment.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ImageFragment.kt index 4398b21..c83d60e 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ImageFragment.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ImageFragment.kt @@ -1,23 +1,18 @@ package bou.amine.apps.readerforselfossv2.android.fragments -import android.graphics.drawable.Drawable -import android.graphics.drawable.LayerDrawable import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment -import bou.amine.apps.readerforselfossv2.android.R import bou.amine.apps.readerforselfossv2.android.databinding.FragmentImageBinding import com.bumptech.glide.Glide -import com.bumptech.glide.request.target.ImageViewTarget class ImageFragment : Fragment() { private lateinit var imageUrl : String private var _binding: FragmentImageBinding? = null private val binding get() = _binding - private lateinit var layers: LayerDrawable override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -32,17 +27,7 @@ class ImageFragment : Fragment() { binding!!.photoView.visibility = View.VISIBLE Glide.with(activity) .load(imageUrl) - .into(object : ImageViewTarget(binding!!.photoView) { - override fun setResource(resource: Drawable?) { - val background = resources.getDrawable(R.drawable.checkerboard, context?.theme) - layers = LayerDrawable(arrayOf(background, resource)) - binding!!.photoView.setImageDrawable(layers) - } - - override fun onLoadCleared(placeholder: Drawable?) { - layers = LayerDrawable(emptyArray()) - } - }) + .into(binding!!.photoView) return view } diff --git a/androidApp/src/main/res/drawable/checktile.png b/androidApp/src/main/res/drawable/checktile.png index e71359d16c0be3c3feab27c3f826987f9b87f73f..eeef9de50682fd36cdb1c09354e84d019c946362 100644 GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9GG!XV7ZFl&wkP>``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eBeuJlrV@L(#+slrE2Mh!n9HP8GzE`+7<=Ro( z1XY8>o4@bliOM#7>AH^Lgeb#KCWUZ@CtM9Nj1#mOidY@62%i6I_+rlCC1Tj*Fg09e b|G{u?HrGA=M@gH2Zej3r^>bP0l+XkK73oK% literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`nw~C>Ar*1S7RArb)Yr@qNN~8` v(8t*r$jsKt_=4#L!(E3Go2&yH3>X+riL77u;=!DiKurvuu6{1-oD!M \ No newline at end of file