Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
529
Issue boards
Milestones
Wiki
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
3d0eca83
Commit
3d0eca83
authored
3 years ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Fix the seek animation when out of media bounds
Fix #1176
parent
0204f3d3
No related branches found
Branches containing commit
Tags
3.0.17.3
Tags containing commit
1 merge request
!999
Various UI fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
+5
-8
5 additions, 8 deletions
...roid/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
with
5 additions
and
8 deletions
application/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
+
5
−
8
View file @
3d0eca83
...
...
@@ -2,10 +2,8 @@ package org.videolan.vlc.gui.video
import
android.animation.Animator
import
android.animation.AnimatorSet
import
android.animation.ArgbEvaluator
import
android.animation.ObjectAnimator
import
android.content.res.Configuration
import
android.graphics.Color
import
android.media.AudioManager
import
android.os.Handler
import
android.provider.Settings
...
...
@@ -15,10 +13,8 @@ import android.util.TypedValue
import
android.view.*
import
androidx.appcompat.widget.ViewStubCompat
import
androidx.constraintlayout.widget.ConstraintSet
import
androidx.core.content.ContextCompat
import
androidx.core.view.ScaleGestureDetectorCompat
import
com.google.android.material.circularreveal.CircularRevealCompat
import
com.google.android.material.circularreveal.CircularRevealWidget
import
kotlinx.android.synthetic.main.player_overlay_seek.*
import
kotlinx.coroutines.ExperimentalCoroutinesApi
import
kotlinx.coroutines.ObsoleteCoroutinesApi
...
...
@@ -441,6 +437,7 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
var
position
=
player
.
time
+
delta
if
(
position
<
0
)
position
=
0
if
(
position
>
service
.
length
)
position
=
service
.
length
player
.
seek
(
position
)
val
sb
=
StringBuilder
()
val
seekForward
=
delta
>=
0
...
...
@@ -458,10 +455,10 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
nbTimesTaped
++
lastSeekWasForward
=
seekForward
sb
.
append
(
if
(
nbTimesTaped
==
-
1
)
(
delta
/
1000f
).
toInt
()
else
(
nbTimesTaped
*
(
delta
/
1000f
).
toInt
()))
.
append
(
"s
(
"
)
.
append
(
Tools
.
millisToString
(
service
.
time
))
.
append
(
')'
)
if
(
service
.
time
>
0
&&
service
.
time
<
service
.
length
)
sb
.
append
(
if
(
nbTimesTaped
==
-
1
)
(
delta
/
1000f
).
toInt
()
else
(
nbTimesTaped
*
(
delta
/
1000f
).
toInt
()))
.
append
(
"s "
)
sb
.
append
(
"("
)
.
append
(
Tools
.
millisToString
(
service
.
time
))
.
append
(
')'
)
val
container
=
if
(
seekForward
)
player
.
rightContainer
else
player
.
leftContainer
val
containerBackground
=
if
(
seekForward
)
player
.
rightContainerBackground
else
player
.
leftContainerBackground
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment