@Override
    public int getOpacity() {
        final Paint bPaint = mBackgroundPaint;
        final Paint fPaint = mForegroundPaint;
        if (bPaint.getXfermode() == null && fPaint.getXfermode() == null) {
            final int alpha = Color.alpha(fPaint.getColor());
            if (alpha == 0) {
                return PixelFormat.TRANSPARENT;
            }
            if (alpha == 255) {
                return PixelFormat.OPAQUE;
            }
        }
        // not sure, so be safe
        return PixelFormat.TRANSLUCENT;
    }
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