updating to the latest Subsampling view

This commit is contained in:
tibbi 2019-01-21 16:25:34 +01:00
parent b10a1409e2
commit ec9e30271b
2 changed files with 6 additions and 8 deletions

View file

@ -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'
}

View file

@ -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()
}
})
}
}
}