code: private void calculateMinimumScaleToFit() {
      float minimumScaleX = getWidth() / (float) getContentWidth();
      float minimumScaleY = getHeight() / (float) getContentHeight();
      float recalculatedMinScale = computeMinimumScaleForMode(minimumScaleX, minimumScaleY);
      if (recalculatedMinScale != mEffectiveMinScale) {
        mEffectiveMinScale = recalculatedMinScale;
        if (mScale < mEffectiveMinScale) {
          setScale(mEffectiveMinScale);
        }
      }
    }
docs: scale limits