public class

ProgressBarDrawable

extends Drawable
implements CloneableDrawable
java.lang.Object
   ↳ android.graphics.drawable.Drawable
     ↳ com.facebook.drawee.drawable.ProgressBarDrawable

Class Overview

Drawable that displays a progress bar based on the level.

Summary

Public Constructors
ProgressBarDrawable()
Public Methods
Drawable cloneDrawable()
Creates a copy of the drawable.
void draw(Canvas canvas)
int getBackgroundColor()
Gets the progress bar background color.
int getBarWidth()
Gets the progress bar width.
int getColor()
Gets the progress bar color.
boolean getHideWhenZero()
Gets whether the progress bar should be hidden when the progress is 0.
boolean getIsVertical()
Gets if the progress bar is vertical.
int getOpacity()
boolean getPadding(Rect padding)
Gets the progress bar padding.
int getRadius()
Gets the radius of the progress bar.
void setAlpha(int alpha)
void setBackgroundColor(int backgroundColor)
Sets the progress bar background color.
void setBarWidth(int barWidth)
Sets the progress bar width.
void setColor(int color)
Sets the progress bar color.
void setColorFilter(ColorFilter cf)
void setHideWhenZero(boolean hideWhenZero)
Sets whether the progress bar should be hidden when the progress is 0.
void setIsVertical(boolean isVertical)
Sets if the progress bar should be vertical.
void setPadding(int padding)
Sets the progress bar padding.
void setRadius(int radius)
The progress bar will be displayed as a rounded corner rectangle, sets the radius here.
Protected Methods
boolean onLevelChange(int level)
[Expand]
Inherited Methods
From class android.graphics.drawable.Drawable
From class java.lang.Object
From interface com.facebook.drawee.drawable.CloneableDrawable

Public Constructors

public ProgressBarDrawable ()

Public Methods

public Drawable cloneDrawable ()

Creates a copy of the drawable.

Returns
  • the drawable copy

public void draw (Canvas canvas)

public int getBackgroundColor ()

Gets the progress bar background color.

public int getBarWidth ()

Gets the progress bar width.

public int getColor ()

Gets the progress bar color.

public boolean getHideWhenZero ()

Gets whether the progress bar should be hidden when the progress is 0.

public boolean getIsVertical ()

Gets if the progress bar is vertical.

public int getOpacity ()

public boolean getPadding (Rect padding)

Gets the progress bar padding.

public int getRadius ()

Gets the radius of the progress bar.

public void setAlpha (int alpha)

public void setBackgroundColor (int backgroundColor)

Sets the progress bar background color.

public void setBarWidth (int barWidth)

Sets the progress bar width.

public void setColor (int color)

Sets the progress bar color.

public void setColorFilter (ColorFilter cf)

public void setHideWhenZero (boolean hideWhenZero)

Sets whether the progress bar should be hidden when the progress is 0.

public void setIsVertical (boolean isVertical)

Sets if the progress bar should be vertical.

public void setPadding (int padding)

Sets the progress bar padding.

public void setRadius (int radius)

The progress bar will be displayed as a rounded corner rectangle, sets the radius here.

Protected Methods

protected boolean onLevelChange (int level)