private void measureContainer(int widthMeasureSpec, int heightMeasureSpec) {
        int resultWidth = 0;
        int resultHeight = 0;

        int widthSize = MeasureSpec.getSize(widthMeasureSpec);
        int widthMode = MeasureSpec.getMode(widthMeasureSpec);

        int heightSize = MeasureSpec.getSize(heightMeasureSpec);
        int heightMode = MeasureSpec.getMode(heightMeasureSpec);

        if (widthMode != MeasureSpec.EXACTLY || heightMode != MeasureSpec.EXACTLY) {
            resultWidth = getSuggestedMinimumWidth() == 0 ? getWidth() : getSuggestedMinimumWidth();
            resultHeight = getSuggestedMinimumHeight() == 0 ? getHeight() : getSuggestedMinimumHeight();
        } else {
            resultWidth = resultHeight = Math.min(widthSize, heightSize);
        }

        setMeasuredDimension(resultWidth, resultHeight);
    }
author : engineer
e-mail : yingkongshi11@gmail.com
time   : 2018/2/4
desc   :
version: 1.0
app/src/main/java/home/smart/fly/animations/customview/CircleMenu.java