code: private float skipPagerMovement(float pagerDx, State state, RectF movBounds) {
          float overscrollDist = getSettings().getOverscrollDistanceY() * OVERSCROLL_THRESHOLD_FACTOR;
  
          float overscrollThreshold = 0f;
          if (state.getY() < movBounds.top) {
              overscrollThreshold = (movBounds.top - state.getY()) / overscrollDist;
          } else if (state.getY() > movBounds.bottom) {
              overscrollThreshold = (state.getY() - movBounds.bottom) / overscrollDist;
          }
  
          float minZoom = getStateController().getFitZoom(state);
          float zoomThreshold = minZoom == 0f ? 0f : state.getZoom() / minZoom - 1f;
  
          float pagerThreshold = Math.max(overscrollThreshold, zoomThreshold);
          pagerThreshold = (float) Math.sqrt(Math.max(0f, Math.min(pagerThreshold, 1f)));
          pagerThreshold *= SCROLL_THRESHOLD * touchSlop;
  
          // Resetting skipped amount when starting scrolling in different direction
          if (viewPagerSkippedX * pagerDx < 0f && viewPagerX == 0) {
              viewPagerSkippedX = 0f;
          }
  
          // Ensuring we have full skipped amount if pager is scrolled
          if (hasViewPagerX()) {
              viewPagerSkippedX = pagerThreshold * Math.signum(viewPagerX);
          }
  
          // Skipping pager movement and accumulating skipped amount, if not passed threshold
          if (Math.abs(viewPagerSkippedX) < pagerThreshold && pagerDx * viewPagerSkippedX >= 0) {
              viewPagerSkippedX += pagerDx;
              // Reverting over-skipped amount
              float over = Math.abs(viewPagerSkippedX) - pagerThreshold;
              over = Math.max(0f, over) * Math.signum(pagerDx);
  
              viewPagerSkippedX -= over;
              return over;
          } else {
              return pagerDx;
          }
      }
docs: /*
  Skips part of pager movement to make it harder scrolling pager when image is zoomed
  or when image is over-scrolled in y direction.