disable subsampling view at swiping away from it
This commit is contained in:
parent
da70c220d2
commit
d647bbb583
1 changed files with 3 additions and 0 deletions
|
@ -200,6 +200,8 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
scheduleZoomableView()
|
scheduleZoomableView()
|
||||||
} else {
|
} else {
|
||||||
|
view.subsampling_view.recycle()
|
||||||
|
view.subsampling_view.beGone()
|
||||||
loadZoomableViewHandler.removeCallbacksAndMessages(null)
|
loadZoomableViewHandler.removeCallbacksAndMessages(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -303,6 +305,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
private fun addZoomableView() {
|
private fun addZoomableView() {
|
||||||
val rotation = degreesForRotation(imageOrientation)
|
val rotation = degreesForRotation(imageOrientation)
|
||||||
view.subsampling_view.apply {
|
view.subsampling_view.apply {
|
||||||
|
background = ColorDrawable(Color.TRANSPARENT)
|
||||||
setBitmapDecoderFactory { PicassoDecoder(medium.path, Picasso.get(), rotation) }
|
setBitmapDecoderFactory { PicassoDecoder(medium.path, Picasso.get(), rotation) }
|
||||||
setRegionDecoderFactory { PicassoRegionDecoder() }
|
setRegionDecoderFactory { PicassoRegionDecoder() }
|
||||||
maxScale = 10f
|
maxScale = 10f
|
||||||
|
|
Loading…
Reference in a new issue