mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
disable Down gesture if the video or gif are zoomed in
This commit is contained in:
@ -519,7 +519,9 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||
val diffY = mTouchDownY - event.y
|
||||
|
||||
val downGestureDuration = System.currentTimeMillis() - mTouchDownTime
|
||||
if (config.allowDownGesture && !mIgnoreCloseDown && Math.abs(diffY) > Math.abs(diffX) && diffY < -mCloseDownThreshold && downGestureDuration < MAX_CLOSE_DOWN_GESTURE_DURATION) {
|
||||
if (config.allowDownGesture && !mIgnoreCloseDown && Math.abs(diffY) > Math.abs(diffX) && diffY < -mCloseDownThreshold &&
|
||||
downGestureDuration < MAX_CLOSE_DOWN_GESTURE_DURATION &&
|
||||
video_surface_frame.controller.state.zoom == 1f) {
|
||||
supportFinishAfterTransition()
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,9 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
|
||||
if (context.config.allowDownGesture) {
|
||||
gif_view.setOnTouchListener { v, event ->
|
||||
handleEvent(event)
|
||||
if (gif_view_frame.controller.state.zoom == 1f) {
|
||||
handleEvent(event)
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
||||
}
|
||||
|
||||
video_surface_frame.setOnTouchListener { view, event ->
|
||||
handleEvent(event)
|
||||
if (video_surface_frame.controller.state.zoom == 1f) {
|
||||
handleEvent(event)
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user