Code example for Scroller

Methods: fling

0
        } 
 
        @Override 
        public boolean onFling(final MotionEvent e1, final MotionEvent e2, final float vX, final float vY) {
            inTouch = false;
            scroller.fling((int) getCurrentValue(), 0, -(int)vX, 0, 0, (int)MAX_VALUE, 0, 0);
            ZoomRoll.this.postInvalidate();
            return true; 
        } 
 
        @Override 
        public boolean onScroll(final MotionEvent e1, final MotionEvent e2, final float distanceX, final float distanceY) {
            setCurrentValue(getCurrentValue() + distanceX);
            scroller.computeScrollOffset();
            ZoomRoll.this.postInvalidate();
            return true; 
        } 
 
        @Override 
        public boolean onSingleTapUp(final MotionEvent e) {
            scroller.computeScrollOffset();