mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
disable eager loading and set serial executor at Subsampling
This commit is contained in:
@ -8,6 +8,7 @@ import android.graphics.Matrix
|
|||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.media.ExifInterface.*
|
import android.media.ExifInterface.*
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
import android.os.AsyncTask
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@ -255,6 +256,8 @@ class PhotoFragment : ViewPagerFragment() {
|
|||||||
isQuickScaleEnabled = context.config.oneFingerZoom
|
isQuickScaleEnabled = context.config.oneFingerZoom
|
||||||
setImage(ImageSource.uri(medium.path))
|
setImage(ImageSource.uri(medium.path))
|
||||||
orientation = if (orient == -1) SubsamplingScaleImageView.ORIENTATION_USE_EXIF else degreesForRotation(orient)
|
orientation = if (orient == -1) SubsamplingScaleImageView.ORIENTATION_USE_EXIF else degreesForRotation(orient)
|
||||||
|
setEagerLoadingEnabled(false)
|
||||||
|
setExecutor(AsyncTask.SERIAL_EXECUTOR)
|
||||||
setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener {
|
setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener {
|
||||||
override fun onImageLoaded() {
|
override fun onImageLoaded() {
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user