mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
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.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)
|
||||
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()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue