@Override
    public boolean onTouchEvent(MotionEvent event) {
        if (!isCurrentPointerIntercepted) {
            return false;
        }
        gestureDetector.onTouchEvent(event);
        switch (event.getAction()) {
            case MotionEvent.ACTION_DOWN:
                lastY = event.getY();
                return true;
            case MotionEvent.ACTION_MOVE:
                int deltaY = (int) ((event.getY() - lastY) * DRAG_SPEED_MULTIPLIER);
                deltaY = (int) (Math.signum(deltaY)) * Math.min(Math.abs(deltaY), DRAG_SPEED_SLOP);
                if (disposeEdgeValue(deltaY)) {
                    return true;
                }
                currentInnerStatus = InnerStatus.MOVING;
                int toScrollY = getScrollY() - deltaY;
                if (toScrollY >= -minOffset) {
                    scrollTo(0, -minOffset);
                } else if (toScrollY <= -maxOffset && !isSupportExit) {
                    scrollTo(0, -maxOffset);
                } else {
                    scrollTo(0, toScrollY);
                }
                lastY = event.getY();
                return true;
            case MotionEvent.ACTION_UP:
            case MotionEvent.ACTION_CANCEL:
                if (currentInnerStatus == InnerStatus.MOVING) {
                    completeMove();
                    return true;
                }
                break;
            default:
                return false;
        }
        return false;
    }
Set the scrolled position of your view. This will cause a call to
{@link #onScrollChanged(int, int, int, int)} and the view will be
invalidated.

@param x the x position to scroll to
@param y the y position to scroll to
scrolllayout/src/main/java/com/yinglan/scrolllayout/ScrollLayout.java