diff --git a/app/build.gradle b/app/build.gradle index a4e1c1327..a8ccb23dc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -79,5 +79,5 @@ dependencies { //implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0' //implementation 'com.github.tibbi:subsampling-scale-image-view:v3.10.1-fork' - implementation 'com.github.tibbi:subsampling-scale-image-view:9e9a393cc3' + implementation 'com.github.tibbi:subsampling-scale-image-view:bf097548ba' } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index cf28f4330..862f2c483 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -442,17 +442,15 @@ class PhotoFragment : ViewPagerFragment() { setMaxTileSize(if (config.showHighestQuality) Integer.MAX_VALUE else 4096) setMinimumTileDpi(if (config.showHighestQuality) -1 else getMinTileDpi()) background = ColorDrawable(Color.TRANSPARENT) - setBitmapDecoderFactory(bitmapDecoder) - setRegionDecoderFactory(regionDecoder) + bitmapDecoderFactory = bitmapDecoder + regionDecoderFactory = regionDecoder maxScale = 10f beVisible() isQuickScaleEnabled = config.oneFingerZoom isOneToOneZoomEnabled = config.allowOneToOneZoom - setResetScaleOnSizeChange(false) setOrientation(rotation) - setEagerLoadingEnabled(false) setImage(ImageSource.uri(path)) - setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener { + onImageEventListener = object : SubsamplingScaleImageView.OnImageEventListener { override fun onImageLoaded() { } @@ -460,7 +458,7 @@ class PhotoFragment : ViewPagerFragment() { background = ColorDrawable(if (config.blackBackground) Color.BLACK else config.backgroundColor) val useWidth = if (mImageOrientation == ORIENTATION_ROTATE_90 || mImageOrientation == ORIENTATION_ROTATE_270) sHeight else sWidth val useHeight = if (mImageOrientation == ORIENTATION_ROTATE_90 || mImageOrientation == ORIENTATION_ROTATE_270) sWidth else sHeight - setDoubleTapZoomScale(getDoubleTapZoomScale(useWidth, useHeight)) + doubleTapZoomScale = getDoubleTapZoomScale(useWidth, useHeight) mOriginalSubsamplingScale = scale } @@ -482,7 +480,7 @@ class PhotoFragment : ViewPagerFragment() { mIsSubsamplingVisible = false beGone() } - }) + } } }