Commit f925b241 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

VerticalSeekBar: store getMax() value

parent 6568a711
...@@ -97,7 +97,8 @@ public class VerticalSeekBar extends SeekBar { ...@@ -97,7 +97,8 @@ public class VerticalSeekBar extends SeekBar {
break; break;
case MotionEvent.ACTION_MOVE: case MotionEvent.ACTION_MOVE:
if (mIsMovingThumb) { 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); onSizeChanged(getWidth(), getHeight(), 0, 0);
handled = true; handled = true;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment