From ed4d8702618e54e946fc7b858886cd07dbe2837a Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 3 Jan 2019 23:53:57 +0100 Subject: [PATCH] show the current video progress if dragging at fullscreen mode --- .../pro/activities/VideoPlayerActivity.kt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt index 9b0b555ce..53ed1026c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt @@ -470,6 +470,11 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen val diffY = event.y - mTouchDownY if (mIsDragged || (Math.abs(diffX) > mDragThreshold && Math.abs(diffX) > Math.abs(diffY))) { + if (!mIsDragged) { + arrayOf(video_curr_time, video_seekbar, video_duration).forEach { + it.animate().alpha(1f).start() + } + } mIgnoreCloseDown = true mIsDragged = true var percent = ((diffX / mScreenWidth) * 100).toInt() @@ -490,8 +495,16 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen supportFinishAfterTransition() } mIgnoreCloseDown = false - if (mIsDragged && !mIsPlaying) { - togglePlayPause() + if (mIsDragged) { + if (mIsFullscreen) { + arrayOf(video_curr_time, video_seekbar, video_duration).forEach { + it.animate().alpha(0f).start() + } + } + + if (!mIsPlaying) { + togglePlayPause() + } } mIsDragged = false }