v7/appcompat/src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java
private void validateAndSetAutoSizeTextTypeUniformConfiguration(
            float autoSizeMinTextSizeInPx,
            float autoSizeMaxTextSizeInPx,
            float autoSizeStepGranularityInPx) throws IllegalArgumentException {
        // First validate.
        if (autoSizeMinTextSizeInPx <= 0) {
            throw new IllegalArgumentException("Minimum auto-size text size ("
                    + autoSizeMinTextSizeInPx  + "px) is less or equal to (0px)");
        }

        if (autoSizeMaxTextSizeInPx <= autoSizeMinTextSizeInPx) {
            throw new IllegalArgumentException("Maximum auto-size text size ("
                    + autoSizeMaxTextSizeInPx + "px) is less or equal to minimum auto-size "
                    + "text size (" + autoSizeMinTextSizeInPx + "px)");
        }

        if (autoSizeStepGranularityInPx <= 0) {
            throw new IllegalArgumentException("The auto-size step granularity ("
                    + autoSizeStepGranularityInPx + "px) is less or equal to (0px)");
        }

        // All good, persist the configuration.
        mAutoSizeTextType = TextViewCompat.AUTO_SIZE_TEXT_TYPE_UNIFORM;
        mAutoSizeMinTextSizeInPx = autoSizeMinTextSizeInPx;
        mAutoSizeMaxTextSizeInPx = autoSizeMaxTextSizeInPx;
        mAutoSizeStepGranularityInPx = autoSizeStepGranularityInPx;
        mHasPresetAutoSizeValues = false;
    }
/**
     * If all params are valid then save the auto-size configuration.
     *
     * @throws IllegalArgumentException if any of the params are invalid
     */
If all params are valid then save the auto-size configuration.
@throws IllegalArgumentException if any of the params are invalid
If all params are valid then save the auto - size configuration . @throws IllegalArgumentException if any of the params are invalid
private void validateAndSetAutoSizeTextTypeUniformConfiguration(
            float autoSizeMinTextSizeInPx,
            float autoSizeMaxTextSizeInPx,
            float autoSizeStepGranularityInPx) throws IllegalArgumentException {
        if (autoSizeMinTextSizeInPx <= 0) {
            throw new IllegalArgumentException("Minimum auto-size text size ("
                    + autoSizeMinTextSizeInPx  + "px) is less or equal to (0px)");
        }
        if (autoSizeMaxTextSizeInPx <= autoSizeMinTextSizeInPx) {
            throw new IllegalArgumentException("Maximum auto-size text size ("
                    + autoSizeMaxTextSizeInPx + "px) is less or equal to minimum auto-size "
                    + "text size (" + autoSizeMinTextSizeInPx + "px)");
        }
        if (autoSizeStepGranularityInPx <= 0) {
            throw new IllegalArgumentException("The auto-size step granularity ("
                    + autoSizeStepGranularityInPx + "px) is less or equal to (0px)");
        }
        mAutoSizeTextType = TextViewCompat.AUTO_SIZE_TEXT_TYPE_UNIFORM;
        mAutoSizeMinTextSizeInPx = autoSizeMinTextSizeInPx;
        mAutoSizeMaxTextSizeInPx = autoSizeMaxTextSizeInPx;
        mAutoSizeStepGranularityInPx = autoSizeStepGranularityInPx;
        mHasPresetAutoSizeValues = false;
    }
private void validateAndSetAutoSizeTextTypeUniformConfiguration ( float autoSizeMinTextSizeInPx , float autoSizeMaxTextSizeInPx , float autoSizeStepGranularityInPx ) throws IllegalArgumentException { if ( autoSizeMinTextSizeInPx <= 0 ) { throw new IllegalArgumentException ( "Minimum auto-size text size (" + autoSizeMinTextSizeInPx + "px) is less or equal to (0px)" ) ; } if ( autoSizeMaxTextSizeInPx <= autoSizeMinTextSizeInPx ) { throw new IllegalArgumentException ( "Maximum auto-size text size (" + autoSizeMaxTextSizeInPx + "px) is less or equal to minimum auto-size " + "text size (" + autoSizeMinTextSizeInPx + "px)" ) ; } if ( autoSizeStepGranularityInPx <= 0 ) { throw new IllegalArgumentException ( "The auto-size step granularity (" + autoSizeStepGranularityInPx + "px) is less or equal to (0px)" ) ; } mAutoSizeTextType = TextViewCompat . AUTO_SIZE_TEXT_TYPE_UNIFORM ; mAutoSizeMinTextSizeInPx = autoSizeMinTextSizeInPx ; mAutoSizeMaxTextSizeInPx = autoSizeMaxTextSizeInPx ; mAutoSizeStepGranularityInPx = autoSizeStepGranularityInPx ; mHasPresetAutoSizeValues = false ; }
If all params are valid then save the auto-size configuration.
If all params are valid then save the auto - size configuration .
// First validate. // All good, persist the configuration.