ProgressBarManager

public final class ProgressBarManager


Manager for showing/hiding progress bar widget. This class lets user specify an initial delay after which the progress bar will be shown. This is currently being used in BrowseFragment&VerticalGridFragment to show ProgressBar while the data is being loaded.

Summary

Public constructors

Public methods

void

Disables progress bar.

void

Enables progress bar.

long

Returns the initial delay.

void

Hides the progress bar.

void
setInitialDelay(long initialDelay)

Sets the initial delay.

void
setProgressBarView(View progressBarView)

Sets a custom view to be shown in place of the default ProgressBar.

void

Sets the root view on which the progress bar will be attached.

void

Displays the progress bar.

Public constructors

ProgressBarManager

Added in 1.1.0
public ProgressBarManager()

Public methods

disableProgressBar

Added in 1.1.0
public void disableProgressBar()

Disables progress bar.

enableProgressBar

Added in 1.1.0
public void enableProgressBar()

Enables progress bar.

getInitialDelay

Added in 1.1.0
public long getInitialDelay()

Returns the initial delay.

hide

Added in 1.1.0
public void hide()

Hides the progress bar.

setInitialDelay

Added in 1.1.0
public void setInitialDelay(long initialDelay)

Sets the initial delay. Progress bar will be shown after this delay has elapsed.

Parameters
long initialDelay

millisecond representing the initial delay.

setProgressBarView

Added in 1.1.0
public void setProgressBarView(View progressBarView)

Sets a custom view to be shown in place of the default ProgressBar. This view must have a parent. Once set, we maintain the visibility property of this view.

Parameters
View progressBarView

custom view that will be shown to indicate progress.

setRootView

Added in 1.1.0
public void setRootView(ViewGroup rootView)

Sets the root view on which the progress bar will be attached. This class assumes the root view to be FrameLayout in order to position the progress bar widget in the center of the screen.

Parameters
ViewGroup rootView

view that will contain the progress bar.

show

Added in 1.1.0
public void show()

Displays the progress bar.