LoadingIndicator

public final class LoadingIndicator


This class implements the loading indicators.

Summary

Public fields

final LoadingIndicatorDrawable

Public constructors

LoadingIndicator(Context context)
LoadingIndicator(Context context, AttributeSet attrs)
LoadingIndicator(Context context, AttributeSet attrs, int defStyleAttr)

Public methods

CharSequence
int

Returns the container color for this loading indicator.

int

Returns the container height for this loading indicator in px.

int

Returns the container width for this loading indicator in px.

LoadingIndicatorDrawable

Returns the LoadingIndicatorDrawable object used in this loading indicator.

int[]

Returns the indicator color(s) for this loading indicator in an int array.

int

Returns the indicator size for this loading indicator in px.

void
invalidateDrawable(Drawable drawable)
void
setContainerColor(int containerColor)

Sets a new container color for this loading indicator.

void
setContainerHeight(int containerHeight)

Sets a new container height for this loading indicator.

void
setContainerWidth(int containerWidth)

Sets a new container width for this loading indicator.

void
setIndicatorColor(int[] indicatorColors)

Sets a new indicator color (or a sequence of indicator colors) for this loading indicator.

void
setIndicatorSize(int indicatorSize)

Sets a new indicator size for this loading indicator.

Protected methods

void
onDraw(Canvas canvas)
void
onMeasure(int widthMeasureSpec, int heightMeasureSpec)
void
onSizeChanged(int w, int h, int oldw, int oldh)
void
onVisibilityChanged(View changedView, int visibility)
void
onWindowVisibilityChanged(int visibility)

Public fields

drawable

public final LoadingIndicatorDrawable drawable

Public constructors

LoadingIndicator

public LoadingIndicator(Context context)

LoadingIndicator

public LoadingIndicator(Context context, AttributeSet attrs)

LoadingIndicator

public LoadingIndicator(Context context, AttributeSet attrs, int defStyleAttr)

Public methods

getAccessibilityClassName

public CharSequence getAccessibilityClassName()

getContainerColor

public int getContainerColor()

Returns the container color for this loading indicator.

getContainerHeight

public int getContainerHeight()

Returns the container height for this loading indicator in px.

getContainerWidth

public int getContainerWidth()

Returns the container width for this loading indicator in px.

getDrawable

public LoadingIndicatorDrawable getDrawable()

Returns the LoadingIndicatorDrawable object used in this loading indicator.

getIndicatorColor

public int[] getIndicatorColor()

Returns the indicator color(s) for this loading indicator in an int array.

getIndicatorSize

public int getIndicatorSize()

Returns the indicator size for this loading indicator in px.

invalidateDrawable

public void invalidateDrawable(Drawable drawable)

setContainerColor

public void setContainerColor(int containerColor)

Sets a new container color for this loading indicator.

Parameters
int containerColor

A new container color.

setContainerHeight

public void setContainerHeight(int containerHeight)

Sets a new container height for this loading indicator.

Parameters
int containerHeight

The new container height in px.

setContainerWidth

public void setContainerWidth(int containerWidth)

Sets a new container width for this loading indicator.

Parameters
int containerWidth

The new container width in px.

setIndicatorColor

public void setIndicatorColor(int[] indicatorColors)

Sets a new indicator color (or a sequence of indicator colors) for this loading indicator.

Parameters
int[] indicatorColors

The new indicator color(s).

setIndicatorSize

public void setIndicatorSize(int indicatorSize)

Sets a new indicator size for this loading indicator.

Parameters
int indicatorSize

The new indicator size in px.

Protected methods

onDraw

protected void onDraw(Canvas canvas)

onMeasure

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)

onSizeChanged

protected void onSizeChanged(int w, int h, int oldw, int oldh)

onVisibilityChanged

protected void onVisibilityChanged(View changedView, int visibility)

onWindowVisibilityChanged

protected void onWindowVisibilityChanged(int visibility)