不滚动的ViewPager

public class NoScrollViewPager extends ViewPager {public NoScrollViewPager(Context context, AttributeSet attrs) { super(context, attrs); }@Override public boolean dispatchTouchEvent(MotionEvent ev) { return super.dispatchTouchEvent(ev); }@Override public boolean onInterceptTouchEvent(MotionEvent ev) { return false; }@Override public boolean onTouchEvent(MotionEvent ev) { return true; } }

    推荐阅读