Code example for Scroller

Methods: flinggetCurrXgetCurrY

        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);
            return super.onFling(e1, e2, velocityX, velocityY);
        public boolean onDoubleTapEvent(MotionEvent e) {
            return super.onDoubleTapEvent(e);
        public boolean onDoubleTap(MotionEvent e) {
            // Switch between the original scale and 3x scale. 
Stop searching for code, let great code find you!  Add Codota to your java IDE