package com.prolificinteractive.materialcalendarview;

import android.content.Context;
import android.support.v4.view.BetterViewPager;
import android.view.MotionEvent;

/**
 * Custom ViewPager that allows swiping to be disabled.
 */
class MonthPager extends BetterViewPager {

    private boolean pagingEnabled = true;

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

    @Override
    public void scrollTo(int x, int y) {
        if (pagingEnabled) {
            super.scrollTo(x, y);
        }
    }

    /**
     * enable disable viewpager scroll
     *
     * @param pagingEnabled false to disable paging, true for paging (default)
     */
    public void setPagingEnabled(boolean pagingEnabled) {
        this.pagingEnabled = pagingEnabled;
    }

    /**
     * @return is this viewpager allowed to page
     */
    public boolean isPagingEnabled() {
        return pagingEnabled;
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        return pagingEnabled && super.onInterceptTouchEvent(ev);
    }

    @Override
    public void setPageTransformer(boolean reverseDrawingOrder, PageTransformer transformer) {
        super.setPageTransformer(reverseDrawingOrder, transformer);
    }
}
@@ -389,143 +389,8 @@
  %7D%0A%0A
-    @Override%0A    public void scrollTo(int x, int y) %7B%0A        if (pagingEnabled) %7B%0A            super.scrollTo(x, y);%0A        %7D%0A    %7D%0A%0A
     
@@ -950,157 +950,100 @@
 lic 
-void setPageTransformer(boolean reverseDrawingOrder, PageTransformer transformer) %7B%0A        super.setPageTransformer(reverseDrawingOrder, transformer
+boolean onTouchEvent(MotionEvent ev) %7B%0A        return pagingEnabled && super.onTouchEvent(ev
 );%0A 
@@ -1047,9 +1047,10 @@
 ;%0A    %7D%0A
-
 %7D
+%0A

Fix MonthPager to work better with paging disabled