updating to the latest Subsampling view
This commit is contained in:
parent
b10a1409e2
commit
ec9e30271b
2 changed files with 6 additions and 8 deletions
|
@ -79,5 +79,5 @@ dependencies {
|
||||||
|
|
||||||
//implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
|
//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:v3.10.1-fork'
|
||||||
implementation 'com.github.tibbi:subsampling-scale-image-view:9e9a393cc3'
|
implementation 'com.github.tibbi:subsampling-scale-image-view:bf097548ba'
|
||||||
}
|
}
|
||||||
|
|
|
@ -442,17 +442,15 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
setMaxTileSize(if (config.showHighestQuality) Integer.MAX_VALUE else 4096)
|
setMaxTileSize(if (config.showHighestQuality) Integer.MAX_VALUE else 4096)
|
||||||
setMinimumTileDpi(if (config.showHighestQuality) -1 else getMinTileDpi())
|
setMinimumTileDpi(if (config.showHighestQuality) -1 else getMinTileDpi())
|
||||||
background = ColorDrawable(Color.TRANSPARENT)
|
background = ColorDrawable(Color.TRANSPARENT)
|
||||||
setBitmapDecoderFactory(bitmapDecoder)
|
bitmapDecoderFactory = bitmapDecoder
|
||||||
setRegionDecoderFactory(regionDecoder)
|
regionDecoderFactory = regionDecoder
|
||||||
maxScale = 10f
|
maxScale = 10f
|
||||||
beVisible()
|
beVisible()
|
||||||
isQuickScaleEnabled = config.oneFingerZoom
|
isQuickScaleEnabled = config.oneFingerZoom
|
||||||
isOneToOneZoomEnabled = config.allowOneToOneZoom
|
isOneToOneZoomEnabled = config.allowOneToOneZoom
|
||||||
setResetScaleOnSizeChange(false)
|
|
||||||
setOrientation(rotation)
|
setOrientation(rotation)
|
||||||
setEagerLoadingEnabled(false)
|
|
||||||
setImage(ImageSource.uri(path))
|
setImage(ImageSource.uri(path))
|
||||||
setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener {
|
onImageEventListener = object : SubsamplingScaleImageView.OnImageEventListener {
|
||||||
override fun onImageLoaded() {
|
override fun onImageLoaded() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +458,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
background = ColorDrawable(if (config.blackBackground) Color.BLACK else config.backgroundColor)
|
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 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
|
val useHeight = if (mImageOrientation == ORIENTATION_ROTATE_90 || mImageOrientation == ORIENTATION_ROTATE_270) sWidth else sHeight
|
||||||
setDoubleTapZoomScale(getDoubleTapZoomScale(useWidth, useHeight))
|
doubleTapZoomScale = getDoubleTapZoomScale(useWidth, useHeight)
|
||||||
mOriginalSubsamplingScale = scale
|
mOriginalSubsamplingScale = scale
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,7 +480,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
mIsSubsamplingVisible = false
|
mIsSubsamplingVisible = false
|
||||||
beGone()
|
beGone()
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue