From d647bbb583d9dd4ff4bf5a595b6c3764d202d190 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 8 Aug 2018 22:28:03 +0200 Subject: [PATCH] disable subsampling view at swiping away from it --- .../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 64026a742..cff43e650 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -200,6 +200,8 @@ class PhotoFragment : ViewPagerFragment() { if (isVisible) { scheduleZoomableView() } else { + view.subsampling_view.recycle() + view.subsampling_view.beGone() loadZoomableViewHandler.removeCallbacksAndMessages(null) } } @@ -303,6 +305,7 @@ class PhotoFragment : ViewPagerFragment() { private fun addZoomableView() { val rotation = degreesForRotation(imageOrientation) view.subsampling_view.apply { + background = ColorDrawable(Color.TRANSPARENT) setBitmapDecoderFactory { PicassoDecoder(medium.path, Picasso.get(), rotation) } setRegionDecoderFactory { PicassoRegionDecoder() } maxScale = 10f