Code example for Scroller

Methods: fling, getCurrX, getCurrY

0
            super.onLongPress(e);
        } 
 
        @Override 
        public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
            mPrevX = mScroller.getCurrX();
            mPrevY = mScroller.getCurrY();
            mScroller.fling(mPrevX, mPrevY, -(int) (velocityX), -(int) (velocityY), Integer.MIN_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE);
            postInvalidate();
            return super.onFling(e1, e2, velocityX, velocityY);
        } 
 
        @Override 
        public boolean onDoubleTapEvent(MotionEvent e) {
            return super.onDoubleTapEvent(e);
        } 
 
        @Override 
        public boolean onDoubleTap(MotionEvent e) {
            // Switch between the original scale and 3x scale. 
            if (getScale() > 2F) {