@Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        if (!isEnable) {
            return false;
        }
        if (!isDraggable && currentInnerStatus == InnerStatus.CLOSED) {
            return false;
        }
        switch (ev.getAction()) {
            case MotionEvent.ACTION_DOWN:
                lastX = ev.getX();
                lastY = ev.getY();
                lastDownX = lastX;
                lastDownY = lastY;
                isAllowPointerIntercepted = true;
                isCurrentPointerIntercepted = false;
                if (!scroller.isFinished()) {
                    scroller.forceFinished(true);
                    currentInnerStatus = InnerStatus.MOVING;
                    isCurrentPointerIntercepted = true;
                    return true;
                }
                break;
            case MotionEvent.ACTION_UP:
            case MotionEvent.ACTION_CANCEL:
                isAllowPointerIntercepted = true;
                isCurrentPointerIntercepted = false;
                if (currentInnerStatus == InnerStatus.MOVING) {
                    return true;
                }
                break;
            case MotionEvent.ACTION_MOVE:
                if (!isAllowPointerIntercepted) {
                    return false;
                }
                if (isCurrentPointerIntercepted) {
                    return true;
                }
                int deltaY = (int) (ev.getY() - lastDownY);
                int deltaX = (int) (ev.getX() - lastDownX);
                if (Math.abs(deltaY) < MOTION_DISTANCE_SLOP) {
                    return false;
                }
                if (Math.abs(deltaY) < Math.abs(deltaX)) {
                    // horizontal event
                    if (isAllowHorizontalScroll) {
                        isAllowPointerIntercepted = false;
                        isCurrentPointerIntercepted = false;
                        return false;
                    }
                }
                if (currentInnerStatus == InnerStatus.CLOSED) {
                    // when closed, only handle downwards motion event
                    if (deltaY < 0) {
                        // upwards
                        return false;
                    }
                } else if (currentInnerStatus == InnerStatus.OPENED && !isSupportExit) {
                    // when opened, only handle upwards motion event
                    if (deltaY > 0) {
                        // downwards
                        return false;
                    }
                }
                isCurrentPointerIntercepted = true;
                return true;
            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