ProgressBar.SetProgress(Int32, Boolean) Method

Definition

Sets the current progress to the specified value, optionally animating the visual position between the current and target values.

[Android.Runtime.Register("setProgress", "(IZ)V", "GetSetProgress_IZHandler", ApiSince=24)]
public virtual void SetProgress (int progress, bool animate);
[<Android.Runtime.Register("setProgress", "(IZ)V", "GetSetProgress_IZHandler", ApiSince=24)>]
abstract member SetProgress : int * bool -> unit
override this.SetProgress : int * bool -> unit

Parameters

progress
Int32

the new progress value, between #getMin() and #getMax()

animate
Boolean

true to animate between the current and target values or false to not animate

Attributes

Remarks

Sets the current progress to the specified value, optionally animating the visual position between the current and target values.

Animation does not affect the result of #getProgress(), which will return the target value immediately after this method is called.

Java documentation for android.widget.ProgressBar.setProgress(int, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to