@@ -0,0 +1,929 @@
+package com.wlz.adslibrary;%0A%0Aimport android.content.Context;%0Aimport android.support.v4.view.ViewPager;%0Aimport android.util.AttributeSet;%0Aimport android.view.MotionEvent;%0A%0A/**%0A * Created by WaiLynnZaw on 9/25/16.%0A */%0Apublic class NonScrollablePager extends ViewPager %7B%0A%0A%09private boolean isPagingEnabled;%0A%0A%09public NonScrollablePager(Context context) %7B%0A%09%09super(context);%0A%09%09this.isPagingEnabled = true;%0A%09%7D%0A%0A%09public NonScrollablePager(Context context, AttributeSet attrs) %7B%0A%09%09super(context, attrs);%0A%09%09this.isPagingEnabled = true;%0A%09%7D%0A%0A%09@Override%0A%09public boolean onTouchEvent(MotionEvent event) %7B%0A%09%09if (this.isPagingEnabled) %7B%0A%09%09%09return super.onTouchEvent(event);%0A%09%09%7D%0A%0A%09%09return false;%0A%09%7D%0A%0A%09@Override%0A%09public boolean onInterceptTouchEvent(MotionEvent event) %7B%0A%09%09if (this.isPagingEnabled) %7B%0A%09%09%09return super.onInterceptTouchEvent(event);%0A%09%09%7D%0A%0A%09%09return false;%0A%09%7D%0A%0A%09public void setPagingEnabled(boolean b) %7B%0A%09%09this.isPagingEnabled = b;%0A%09%7D%0A%7D%0A

Add custom view for view pager to disable swiping