mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
show the current video progress if dragging at fullscreen mode
This commit is contained in:
parent
1077369a73
commit
ed4d870261
1 changed files with 15 additions and 2 deletions
|
@ -470,6 +470,11 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||||
val diffY = event.y - mTouchDownY
|
val diffY = event.y - mTouchDownY
|
||||||
|
|
||||||
if (mIsDragged || (Math.abs(diffX) > mDragThreshold && Math.abs(diffX) > Math.abs(diffY))) {
|
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
|
mIgnoreCloseDown = true
|
||||||
mIsDragged = true
|
mIsDragged = true
|
||||||
var percent = ((diffX / mScreenWidth) * 100).toInt()
|
var percent = ((diffX / mScreenWidth) * 100).toInt()
|
||||||
|
@ -490,8 +495,16 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||||
supportFinishAfterTransition()
|
supportFinishAfterTransition()
|
||||||
}
|
}
|
||||||
mIgnoreCloseDown = false
|
mIgnoreCloseDown = false
|
||||||
if (mIsDragged && !mIsPlaying) {
|
if (mIsDragged) {
|
||||||
togglePlayPause()
|
if (mIsFullscreen) {
|
||||||
|
arrayOf(video_curr_time, video_seekbar, video_duration).forEach {
|
||||||
|
it.animate().alpha(0f).start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mIsPlaying) {
|
||||||
|
togglePlayPause()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mIsDragged = false
|
mIsDragged = false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue