ViewImageFragment: upgrade BigImageView to 1.6.6, enable swiping for all kinds of embedded views
This commit is contained in:
parent
483b847120
commit
fe0e68ba5c
@ -178,9 +178,9 @@ dependencies {
|
||||
|
||||
implementation "com.github.connyduck:sparkbutton:4.0.0"
|
||||
|
||||
implementation 'com.github.piasy:BigImageViewer:1.6.5'
|
||||
implementation 'com.github.piasy:GlideImageLoader:1.6.5'
|
||||
implementation 'com.github.piasy:GlideImageViewFactory:1.6.5'
|
||||
implementation 'com.github.piasy:BigImageViewer:1.6.6'
|
||||
implementation 'com.github.piasy:GlideImageLoader:1.6.6'
|
||||
implementation 'com.github.piasy:GlideImageViewFactory:1.6.6'
|
||||
|
||||
implementation "com.mikepenz:materialdrawer:$materialdrawerVersion"
|
||||
implementation "com.mikepenz:materialdrawer-iconics:$materialdrawerVersion"
|
||||
|
@ -118,7 +118,8 @@ class ViewImageFragment : ViewMediaFragment() {
|
||||
swipeStartedWithOneFinger = false
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
if(swipeStartedWithOneFinger && photoView.ssiv.scale <= photoView.ssiv.minScale) {
|
||||
if(swipeStartedWithOneFinger &&
|
||||
(photoView.ssiv == null || photoView.ssiv.scale <= photoView.ssiv.minScale)) {
|
||||
val diff = event.rawY - lastY
|
||||
// This code is to prevent transformations during page scrolling
|
||||
// If we are already translating or we reached the threshold, then transform.
|
||||
@ -149,7 +150,6 @@ class ViewImageFragment : ViewMediaFragment() {
|
||||
}
|
||||
})
|
||||
|
||||
// photoView.setOnTouchListener(this)
|
||||
photoView.setImageLoaderCallback(imageLoaderCallback)
|
||||
photoView.setImageViewFactory(GlideImageViewFactory())
|
||||
|
||||
@ -266,10 +266,8 @@ class ViewImageFragment : ViewMediaFragment() {
|
||||
override fun onSuccess(image: File?) {
|
||||
if(!showingPreview) {
|
||||
progressBar?.hide()
|
||||
photoView.ssiv?.let {
|
||||
it.orientation = SubsamplingScaleImageView.ORIENTATION_USE_EXIF
|
||||
it.setOnTouchListener(imageOnTouchListener)
|
||||
}
|
||||
photoView.ssiv?.orientation = SubsamplingScaleImageView.ORIENTATION_USE_EXIF
|
||||
photoView.mainView?.setOnTouchListener(imageOnTouchListener)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user