[Android] VerticalSeekBar: store getMax() value

Jean-Baptiste Kempf git at videolan.org
Fri Jul 18 21:23:04 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jul 18 21:15:03 2014 +0200| [f925b241ff018848a9c27e52b6ac588a48561977] | committer: Jean-Baptiste Kempf

VerticalSeekBar: store getMax() value

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f925b241ff018848a9c27e52b6ac588a48561977
---

 vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java b/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java
index 4b59f5a..c8a5587 100644
--- a/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java
+++ b/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java
@@ -97,7 +97,8 @@ public class VerticalSeekBar extends SeekBar {
                 break;
             case MotionEvent.ACTION_MOVE:
                 if (mIsMovingThumb) {
-                    setProgress(getMax() - (int) (getMax() * event.getY() / getHeight()));
+                    final int max = getMax();
+                    setProgress( max - (int) (max* event.getY() / getHeight()));
                     onSizeChanged(getWidth(), getHeight(), 0, 0);
                     handled = true;
                 }



More information about the Android mailing list