mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
do not allow closing the fullscreen videoplayer with slow down gestures
This commit is contained in:
parent
34fade06a0
commit
f6696c4552
2 changed files with 3 additions and 2 deletions
|
@ -523,7 +523,8 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||||
val diffX = mTouchDownX - event.x
|
val diffX = mTouchDownX - event.x
|
||||||
val diffY = mTouchDownY - event.y
|
val diffY = mTouchDownY - event.y
|
||||||
|
|
||||||
if (config.allowDownGesture && !mIgnoreCloseDown && Math.abs(diffY) > Math.abs(diffX) && diffY < -mCloseDownThreshold) {
|
val downGestureDuration = System.currentTimeMillis() - mTouchDownTime
|
||||||
|
if (config.allowDownGesture && !mIgnoreCloseDown && Math.abs(diffY) > Math.abs(diffX) && diffY < -mCloseDownThreshold && downGestureDuration < MAX_CLOSE_DOWN_GESTURE_DURATION) {
|
||||||
supportFinishAfterTransition()
|
supportFinishAfterTransition()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ const val GO_TO_PREV_ITEM = "go_to_prev_item"
|
||||||
const val MAX_COLUMN_COUNT = 20
|
const val MAX_COLUMN_COUNT = 20
|
||||||
const val SHOW_TEMP_HIDDEN_DURATION = 300000L
|
const val SHOW_TEMP_HIDDEN_DURATION = 300000L
|
||||||
const val CLICK_MAX_DURATION = 150
|
const val CLICK_MAX_DURATION = 150
|
||||||
const val MAX_CLOSE_DOWN_GESTURE_DURATION = 500
|
const val MAX_CLOSE_DOWN_GESTURE_DURATION = 400
|
||||||
const val DRAG_THRESHOLD = 8
|
const val DRAG_THRESHOLD = 8
|
||||||
const val MONTH_MILLISECONDS = MONTH_SECONDS * 1000L
|
const val MONTH_MILLISECONDS = MONTH_SECONDS * 1000L
|
||||||
const val MIN_SKIP_LENGTH = 2000
|
const val MIN_SKIP_LENGTH = 2000
|
||||||
|
|
Loading…
Reference in a new issue