@Override
    public void draw(Canvas canvas) {
        int count = canvas.save();

        final Paint bPaint = mBackgroundPaint;
        if (bPaint.getColor() != 0 && bPaint.getStrokeWidth() > 0)
            drawBackground(canvas, bPaint);

        final Paint fPaint = mForegroundPaint;
        if (mRun) {
            if (fPaint.getColor() != 0 && fPaint.getStrokeWidth() > 0)
                drawForeground(canvas, fPaint);
            // invalidate next call in this
            scheduleSelf(mAnim, SystemClock.uptimeMillis() + FRAME_DURATION);
        } else if (mProgress > 0) {
            if (fPaint.getColor() != 0 && fPaint.getStrokeWidth() > 0)
                drawForeground(canvas, fPaint);
        }

        canvas.restoreToCount(count);
    }
Set the draw progress
The progress include 0~1 float
On changed, stop animation draw

@param progress Loading progress
caprice/ui/src/main/java/net/qiujuer/genius/ui/drawable/LoadingDrawable.java