@Override
        protected void onResize(float width, float height) {
            super.onResize(width, height);

            mRect.set(0, 0, width, height);

            mCenterX = width / 2;
            mCenterY = height / 2;
            mRadius = Math.min(mCenterX, mCenterY);

            RadialGradient radialGradient = new RadialGradient(mCenterX, mCenterY,
                    mRadius, new int[]{mFillColor, 0x00ffffff},
                    new float[]{0.65f, 1}, Shader.TileMode.CLAMP);
            mShadowPaint.setShader(radialGradient);

        }
Returns the RectF that defines this rectangle's bounds.
caprice/ui/src/main/java/net/qiujuer/genius/ui/widget/FloatActionButton.java