private void stretchViewHorizontally(View view, int crossSize) {
        LayoutParams lp = (LayoutParams) view.getLayoutParams();
        int newWidth = crossSize - lp.leftMargin - lp.rightMargin;
        newWidth = Math.max(newWidth, 0);
        view.measure(MeasureSpec
                        .makeMeasureSpec(newWidth, MeasureSpec.EXACTLY),
                MeasureSpec.makeMeasureSpec(view.getMeasuredHeight(), MeasureSpec.EXACTLY));
    }
Expand the view horizontally to the size of the crossSize (considering the view margins)

@param view      the View to be stretched
@param crossSize the cross size
common/src/main/java/com/sxjs/common/widget/flexboxlayout/FlexboxLayout.java