Skip to content

Linear Progressbar

Overview

A Progressbar is used to visually indicate the user the progress of some task, such as a download, data transfer etc.

A determinate progress bar is used to indicate the progress of an task whose exact value of progress is known for eg. the percentage of a file download, number of files transferred.

A indeterminate progress bar is used in situations where the extent of the task is unknown or the progress of the task cannot be determined in a way that could be expressed as a percentage, for example, when a request to a server is being processed where we don't know the exact value of progress, but there is a need to indicate to the user that the task is in progress.



Linear Progressbar

A determinate progressbar fills from 0% to 100%.
An indeterminate progress bar moves in a fixed path, growing and shrinking in size.

Tip

Use progressbars in a non-interupptive manner.

Properties

Indeterminate

( Getter + Setter )
Type: Boolean

Determines whether the progress bar is to be displayed in the indeterminate mode. (See Overview for the difference between determinate and indeterminate modes.)

Options
true The progressbar is in indeterminate mode.
false The progressbar is in determinate mode.

Indeterminate Color

( Getter + Setter )
Type: Color

The color in which the indeterminate progress bar is displayed, if the Indeterminate property is set to true. Has no effect on the apperance of the determinate progress bar.

Maximum

( Getter + Setter )
Type: Number

The upper range of the progress bar in determinate mode (i.e when the Indeterminate property is set to false.)

The default value is 100

Minimum

( Getter + Setter )
Type: Number

The lower range of the progress bar in determinate mode (i.e when the Indeterminate property is set to false.)

The default value is 0

Note

This property can be set only on devices using Android Oreo or newer versions. Setting this method has no effect on devices using older versions of Android.

Progress

( Getter + Setter | Blocks)
Type: Number

The current progress value of the progress bar in determinate mode (i.e when the Indeterminate property is set to false). When using Getter, returns 0 if Indeterminate is set to true

Visible

( Getter + Setter )
Type: Boolean

Determines whether the Linear Progressbar is visible on the screen and shown to the user or not.

Options
true The Linear Progressbar is shown to the user.
false The Linear Progressbar is not shown to the user.

Width

( Getter + Setter )
Type: Number

The width with which the Linear Progressbar is displayed.

Width Percent

( Setter Only )
Type: Number

The width with which the Linear Progressbar is displayed in terms of precentage of the whole screen width.

Methods

Increment Progress By

( Number value )

Increases the value progress by the given value.

Params
value Number: The amount by which progress should be increased.

Events

Progress Changed

( Number progress )

Indicates that the value of the progress bar has changed.

Params
progress Number: The current value of the progressbar.This is 0 if the progressbar is in indeterminate mode.