private int getChildHeightMeasureSpec(int heightMeasureSpec, LayoutParams lp) {
        int childHeightMeasureSpec = getChildMeasureSpec(heightMeasureSpec,
                getPaddingTop() + getPaddingBottom() + lp.topMargin
                        + lp.bottomMargin, lp.height);
        int childHeight = MeasureSpec.getSize(childHeightMeasureSpec);
        if (childHeight > lp.maxHeight) {
            childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(lp.maxHeight,
                    MeasureSpec.getMode(childHeightMeasureSpec));
        } else if (childHeight < lp.minHeight) {
            childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(lp.minHeight,
                    MeasureSpec.getMode(childHeightMeasureSpec));
        }
        return childHeightMeasureSpec;
    }
Shrink the flex items along the main axis based on the individual flexShrink attribute.

@param widthMeasureSpec     the horizontal space requirements as imposed by the parent
@param heightMeasureSpec    the vertical space requirements as imposed by the parent
@param flexLine             the flex line to which flex items belong
@param flexDirection        the flexDirection value for this FlexboxLayout
@param maxMainSize          the maximum main size. Shrank main size will be this size
@param paddingAlongMainAxis the padding value along the main axis
@param startIndex           the start index of the children views to be shrank. This index
                            needs to
                            be an absolute index in the flex container (FlexboxLayout),
                            not the relative index in the flex line.
@param calledRecursively    true if this method is called recursively, false otherwise
@return the next index, the next flex line's first flex item starts from the returned index
@see #getFlexDirection()
@see #setFlexDirection(int)
@see LayoutParams#flexShrink
common/src/main/java/com/sxjs/common/widget/flexboxlayout/FlexboxLayout.java