Set the draw progress
The progress include 0~1 float
On changed, stop animation draw

@param progress Loading progress
969038
public void setProgress(float progress) {
        if (progress < 0)
            mProgress = 0;
        else if (mProgress > 1)
            mProgress = 1;
        else
            mProgress = progress;
        stop();
        onProgressChange(mProgress);
        invalidateSelf();
    }
1075068
public void setProgressAnimated(double progress) {
        Timeline timeline = new Timeline();

        KeyValue keyValue = new KeyValue(this.progressProperty(), progress);
        KeyFrame keyFrame = new KeyFrame(new Duration(400), keyValue);
        timeline.getKeyFrames().add(keyFrame);

        timeline.play();
    }
515989
def setProgressColor( self, color ):
        
        self._progressColor = QColor(color)
        self.setAlternateProgressColor(self._progressColor.darker(110))
217567
protected void updateProgressNotification(@NonNull final NotificationCompat.Builder builder, final int progress) {
		// Add Abort action to the notification
		if (progress != PROGRESS_ABORTED && progress != PROGRESS_COMPLETED) {
			final Intent abortIntent = new Intent(BROADCAST_ACTION);
			abortIntent.putExtra(EXTRA_ACTION, ACTION_ABORT);
			final PendingIntent pendingAbortIntent = PendingIntent.getBroadcast(this, 1, abortIntent, PendingIntent.FLAG_UPDATE_CURRENT);
			builder.addAction(R.drawable.ic_action_notify_cancel, getString(R.string.dfu_action_abort), pendingAbortIntent);
		}
	}
84883
public boolean setProgress(final int currentRow) {
        final boolean result = _progressBar.setValueIfGreater(currentRow);

        if (result) {
            _progressCountLabel.setText(formatNumber(currentRow));
        }

        return result;
    }
500772
public static void setValue(Progression model, int value) {
		if (model != null && value > model.getValue()) {
			model.setValue(value);
		}
	}
92786
public ProgressStyle setIndeterminate(boolean value){
        if(mProgressStyle == HORIZONTAL) {
            mProgress.setIndeterminate(value);
            mProgressText.setVisibility(value ? View.GONE : View.VISIBLE);
            mProgressMax.setVisibility(value ? View.GONE : View.VISIBLE);
        }
        return this;
    }
849517
@SuppressLint("DefaultLocale")
    @Override
    public void setProgress(int progress) {
        if (getParent() instanceof BootstrapProgressBarGroup){
            this.userProgress = 0;
            setMaxProgress(progress);
        }else {
            if (progress < 0 || progress > maxProgress) {
                throw new IllegalArgumentException(
                        String.format("Invalid value '%d' - progress must be an integer in the range 0-%d", progress, maxProgress));
            }
        }

        this.userProgress = progress;

        if (animated) {
            startProgressUpdateAnimation();
        }
        else {
            this.drawnProgress = progress;
            invalidate();
        }

        ViewParent parent = getParent();
        if (parent != null) {
            if (parent instanceof BootstrapProgressBarGroup) {
                BootstrapProgressBarGroup parentGroup = (BootstrapProgressBarGroup) parent;
                parentGroup.onProgressChanged(this);
            }
        }
    }
871845
public void animateProgressFill(int animateTo) {
        mAnimationHandler.removeMessages(0);
        if (animateTo > mMax || animateTo < 0) {
            throw new IllegalArgumentException(
                    String.format("Animation progress (%d) is greater than the max progress (%d) or lower than 0 ", animateTo, mMax));
        }
        mAnimationHandler.setAnimateTo(animateTo);
        mAnimationHandler.sendEmptyMessage(0);
        invalidate();
    }
870725
@Override
    public void onLoadFinished(Loader<SortedList<Metadata>> loader, SortedList<Metadata> data) {
        progressBar.setVisibility(View.INVISIBLE);
        recyclerView.setVisibility(View.VISIBLE);
        super.onLoadFinished(loader, data);
    }
6654
public GenericDraweeHierarchyBuilder setProgressBarImage(
      Drawable progressBarDrawable, @Nullable ScalingUtils.ScaleType progressBarImageScaleType) {
    mProgressBarImage = progressBarDrawable;
    mProgressBarImageScaleType = progressBarImageScaleType;
    return this;
  }
846038
@Override
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
        Log.d(TAG, "onProgressChanged " + progress);
    }
1056016
@Override
  public synchronized void onProgressUpdate(float progress) {
    if (mIsFinished) {
      return;
    }
    try {
      onProgressUpdateImpl(progress);
    } catch (Exception e) {
      onUnhandledException(e);
    }
  }
122837
public final void setProgressBarType(final ProgressBarType type) {
		ProgressBarType currentType = getProgressBarType();
		ProgressBarType typeToSet = type == null ? DEFAULT_TYPE : type;
		if (typeToSet != currentType) {
			getOrCreateComponentModel().barType = typeToSet;
		}
	}
589131
protected void updateProgressBar(CmsUploadProgessInfo info) {

        switch (info.getState()) {
            case notStarted:
                break;
            case running:
                m_progressInfo.setProgress(info);
                stopLoadingAnimation();
                break;
            case finished:
                m_progressInfo.finish();
                m_mainPanel.displayDialogInfo(Messages.get().key(Messages.GUI_UPLOAD_INFO_FINISHING_0), false);
                startLoadingAnimation(Messages.get().key(Messages.GUI_UPLOAD_INFO_CREATING_RESOURCES_0), 1500);
                break;
            default:
                break;
        }
    }
1282740
def update_progress(total, done)
      percentage = total.zero? ? 100 : ((done.to_f / total) * 100).to_i
      progress(percentage)
    end
597451
@SuppressWarnings("deprecation")
    private void drawBackgroundProgress() {
        GradientDrawable backgroundDrawable = createGradientDrawable(colorBackground);
        int newRadius = radius - (padding / 2);
        backgroundDrawable.setCornerRadii(new float[]{newRadius, newRadius, newRadius, newRadius, newRadius, newRadius, newRadius, newRadius});
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            layoutBackground.setBackground(backgroundDrawable);
        } else {
            layoutBackground.setBackgroundDrawable(backgroundDrawable);
        }
    }