@Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        final int childCount = getChildCount();
        int left, top;
        int itemWidth = (int) (mRadius * RADIO_DEFAULT_CHILD_DIMENSION);
        float angleDelay = 360 / childCount;
        for (int i = 0; i < childCount; i++) {
            View child = getChildAt(i);
            if (child.getVisibility() == GONE) {
                continue;
            }

            mStartAngle %= 360;
            float distanceFromCenter = mRadius / 2f - itemWidth / 2 - mPadding;
            left = (int) (mRadius / 2 + Math.round(distanceFromCenter *
                    Math.cos(Math.toRadians(mStartAngle)) - 1 / 2f * itemWidth));
            top = (int) (mRadius / 2 + Math.round(distanceFromCenter *
                    Math.sin(Math.toRadians(mStartAngle)) - 1 / 2f * itemWidth));
            child.layout(left,top,left+itemWidth,top+itemWidth);

            mStartAngle+=angleDelay;
        }
    }
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