@@ -0,0 +1,1191 @@
+import android.content.Context;%0Aimport android.support.v4.view.ViewPager;%0Aimport android.util.AttributeSet;%0Aimport android.view.MotionEvent;%0A%0A/**%0A * Created by shinechen on 9/14/15.%0A */%0Apublic class LockableViewPager extends ViewPager %7B%0A%0A    private boolean mSwipeable = true;%0A%0A    public LockableViewPager(Context context) %7B%0A        super(context);%0A    %7D%0A%0A    public LockableViewPager(Context context, AttributeSet attrs) %7B%0A        super(context, attrs);%0A    %7D%0A%0A    public void setSwipeable(boolean swipeable) %7B%0A        mSwipeable = swipeable;%0A    %7D%0A%0A    public boolean getSwipeable() %7B%0A        return mSwipeable;%0A    %7D%0A%0A    @Override%0A    public boolean onTouchEvent(MotionEvent event) %7B%0A        switch (event.getAction()) %7B%0A            case MotionEvent.ACTION_DOWN:%0A                if (mSwipeable) %7B%0A                    return super.onTouchEvent(event);%0A                %7D%0A                return false;%0A            default:%0A                return super.onTouchEvent(event);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public boolean onInterceptTouchEvent(MotionEvent event) %7B%0A        if (mSwipeable) %7B%0A            return super.onInterceptTouchEvent(event);%0A        %7D%0A        return false;%0A    %7D%0A%0A%0A%7D%0A

Add Lockable ViewPager