Most visited

Recently visited

ContentLoadingProgressBar

public class ContentLoadingProgressBar
extends ProgressBar

java.lang.Object
   ↳ android.view.View
     ↳ android.widget.ProgressBar
       ↳ android.support.v4.widget.ContentLoadingProgressBar


ContentLoadingProgressBar implements a ProgressBar that waits a minimum time to be dismissed before showing. Once visible, the progress bar will be visible for a minimum amount of time to avoid "flashes" in the UI when an event could take a largely variable time to complete (from none, to a user perceivable amount)

Summary

Inherited XML attributes

From class android.widget.ProgressBar
From class android.view.View

Inherited constants

From class android.view.View

Inherited fields

From class android.view.View

Public constructors

ContentLoadingProgressBar(Context context)
ContentLoadingProgressBar(Context context, AttributeSet attrs)

Public methods

void hide()

Hide the progress view if it is visible.

void onAttachedToWindow()

This is called when the view is attached to a window.

void onDetachedFromWindow()

This is called when the view is detached from a window.

void show()

Show the progress view after waiting for a minimum delay.

Inherited methods

From class android.widget.ProgressBar
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public constructors

ContentLoadingProgressBar

ContentLoadingProgressBar (Context context)

Parameters
context Context

ContentLoadingProgressBar

ContentLoadingProgressBar (Context context, 
                AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

Public methods

hide

void hide ()

Hide the progress view if it is visible. The progress view will not be hidden until it has been shown for at least a minimum show time. If the progress view was not yet visible, cancels showing the progress view.

onAttachedToWindow

void onAttachedToWindow ()

This is called when the view is attached to a window. At this point it has a Surface and will start drawing. Note that this function is guaranteed to be called before onDraw(android.graphics.Canvas), however it may be called any time before the first onDraw -- including before or after onMeasure(int, int).

onDetachedFromWindow

void onDetachedFromWindow ()

This is called when the view is detached from a window. At this point it no longer has a surface for drawing.

show

void show ()

Show the progress view after waiting for a minimum delay. If during that time, hide() is called, the view is never made visible.

Hooray!