package com.padakeji.android.ui.autowraplayoutmanager.example;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;

/**
 * Created by atanl on 2016/3/5.
 */
public class MyScrollView extends ScrollView {

    private int downX;
    private int downY;
    private int mTouchSlop;

    public MyScrollView(Context context) {
        super(context);
    }

    public MyScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent e) {
        int action = e.getAction();
        switch (action) {
            case MotionEvent.ACTION_DOWN:
                downX = (int) e.getRawX();
                downY = (int) e.getRawY();
                break;
            case MotionEvent.ACTION_MOVE:
                int moveY = (int) e.getRawY();
                if (Math.abs(moveY - downY) > mTouchSlop) {
                    return true;
                }
        }
        return super.onInterceptTouchEvent(e);
    }
}

@@ -175,30 +175,102 @@
 oid.
-widget.ScrollView;%0A%0A/*
+view.ViewConfiguration;%0Aimport android.widget.ScrollView;%0A%0A/**%0A * %E7%BB%A7%E6%89%BF%E4%BA%8EScrollView%EF%BC%8C%E7%A6%81%E6%AD%A2%E4%BA%86%E6%BB%91%E5%8A%A8%E4%BA%8B%E4%BB%B6%E5%90%91%E4%B8%8B%E4%BC%A0%E9%80%92%E3%80%82%0A 
 *%0A *
@@ -297,13 +297,15 @@
  201
-6/3/5
+5/10/20
 .%0A *
@@ -354,16 +354,88 @@
 View %7B%0A%0A
+    public interface OnScrollListener %7B%0A        void onScroll();%0A    %7D%0A%0A
     priv
@@ -568,16 +568,90 @@
 ntext);%0A
+        mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();%0A
     %7D%0A%0A 
@@ -743,16 +743,90 @@
 attrs);%0A
+        mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();%0A
     %7D%0A%0A 
@@ -950,16 +950,231 @@
 eAttr);%0A
+        mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();%0A    %7D%0A%0A    @Override%0A    protected void onScrollChanged(int l, int t, int oldl, int oldt) %7B%0A        super.onScrollChanged(l, t, oldl, oldt);%0A
     %7D%0A%0A 

Change the example module fixing scroll problem.