From 5b709d0b70d4c6a69e85d84aff587f1276a6143a Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Jan 2018 12:51:38 +0100 Subject: [PATCH] disable eager loading and set serial executor at Subsampling --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 4bbc7ef34..92135eee8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -8,6 +8,7 @@ import android.graphics.Matrix import android.graphics.drawable.ColorDrawable import android.media.ExifInterface.* import android.net.Uri +import android.os.AsyncTask import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -255,6 +256,8 @@ class PhotoFragment : ViewPagerFragment() { isQuickScaleEnabled = context.config.oneFingerZoom setImage(ImageSource.uri(medium.path)) orientation = if (orient == -1) SubsamplingScaleImageView.ORIENTATION_USE_EXIF else degreesForRotation(orient) + setEagerLoadingEnabled(false) + setExecutor(AsyncTask.SERIAL_EXECUTOR) setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener { override fun onImageLoaded() { }