@@ -0,0 +1,1128 @@
+package com.ganxin.codebase.widgets.viewpager;%0A%0Aimport android.content.Context;%0Aimport android.support.v4.view.ViewPager;%0Aimport android.util.AttributeSet;%0Aimport android.view.MotionEvent;%0A%0A/**%0A * Description : %E7%A6%81%E7%94%A8%E6%BB%91%E5%8A%A8%E7%9A%84ViewPager  %3Cbr/%3E%0A * author : WangGanxin %3Cbr/%3E%0A * date : 2017/3/1 %3Cbr/%3E%0A * email : mail@wangganxin.me %3Cbr/%3E%0A */%0Apublic class DisableScrollViewPager extends ViewPager %7B%0A    public DisableScrollViewPager(Context context) %7B%0A        super(context);%0A    %7D%0A%0A    public DisableScrollViewPager(Context context, AttributeSet attrs) %7B%0A        super(context, attrs);%0A        this.enabled = false;%0A    %7D%0A%0A    private boolean enabled;%0A%0A    // %E8%A7%A6%E6%91%B8%E6%B2%A1%E6%9C%89%E5%8F%8D%E5%BA%94%E5%B0%B1%E5%8F%AF%E4%BB%A5%E4%BA%86%0A    @Override%0A    public boolean onTouchEvent(MotionEvent event) %7B%0A        if (this.enabled) %7B%0A            return super.onTouchEvent(event);%0A        %7D%0A        return false;%0A    %7D%0A%0A    @Override%0A    public boolean onInterceptTouchEvent(MotionEvent event) %7B%0A        if (this.enabled) %7B%0A            return super.onInterceptTouchEvent(event);%0A        %7D%0A%0A        return false;%0A    %7D%0A%0A    public void setPagingEnabled(boolean enabled) %7B%0A        this.enabled = enabled;%0A    %7D%0A%0A%7D%0A

add DisableScrollViewPager