@Override
  public void progressiveStop(CircularProgressDrawable.OnEndListener listener) {
    if (!mParent.isRunning() || mEndAnimator.isRunning()) {
      return;
    }
    mOnEndListener = listener;
    mEndAnimator.addListener(new SimpleAnimatorListener() {

      @Override
      public void onPreAnimationEnd(Animator animation) {
        mEndAnimator.removeListener(this);
        CircularProgressDrawable.OnEndListener endListener = mOnEndListener;
        mOnEndListener = null;

        if (isStartedAndNotCancelled()) {
          setEndRatio(0f);
          mParent.stop();
          if (endListener != null) {
            endListener.onEnd(mParent);
          }
        }
      }
    });
    mEndAnimator.start();
  }
@ Override public void progressiveStop ( CircularProgressDrawable . OnEndListener listener ) { if ( ! mParent . isRunning ( ) || mEndAnimator . isRunning ( ) ) { return ; } mOnEndListener = listener ; mEndAnimator . addListener ( new SimpleAnimatorListener ( ) { @ Override public void onPreAnimationEnd ( Animator animation ) { mEndAnimator . removeListener ( this ) ; CircularProgressDrawable . OnEndListener endListener = mOnEndListener ; mOnEndListener = null ; if ( isStartedAndNotCancelled ( ) ) { setEndRatio ( 0f ) ; mParent . stop ( ) ; if ( endListener != null ) { endListener . onEnd ( mParent ) ; } } } } ) ; mEndAnimator . start ( ) ; }
///////////////////////////////////////////////////////