mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
disable subsampling view at swiping away from it
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user