@Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        int widthSize = MeasureSpec.getSize(widthMeasureSpec);
        int heightSize = MeasureSpec.getSize(heightMeasureSpec);
        int min = Math.min(widthSize, heightSize);
        setMeasuredDimension(min, min);
    }
author : engineer
e-mail : yingkongshi11@gmail.com
time   : 2017/12/10
desc   :
version: 1.0
app/src/main/java/home/smart/fly/animations/master/widget/MasterPaintView.java