java.lang.Object | ||
↳ | android.graphics.drawable.Drawable | |
↳ | com.facebook.drawee.drawable.ArrayDrawable |
Known Direct Subclasses |
A Drawable that contains an array of other Drawables (layers). These are drawn in array order, so the element with the largest index will be drawn on top.
Similar to android's LayerDrawable but it doesn't support adding/removing layers dynamically.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ArrayDrawable(Drawable[] layers)
Constructs a new layer drawable.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | draw(Canvas canvas) | ||||||||||
Drawable |
getDrawable(int index)
Gets the drawable at the specified index.
| ||||||||||
DrawableParent |
getDrawableParentForIndex(int index)
Gets the
DrawableParent for index. | ||||||||||
int | getIntrinsicHeight() | ||||||||||
int | getIntrinsicWidth() | ||||||||||
int |
getNumberOfLayers()
Gets the number of layers.
| ||||||||||
int | getOpacity() | ||||||||||
boolean | getPadding(Rect padding) | ||||||||||
void |
getRootBounds(RectF bounds)
Called when the drawable needs to get its root bounds.
| ||||||||||
void |
getTransform(Matrix transform)
TransformationCallback methods
| ||||||||||
void |
invalidateDrawable(Drawable who)
Drawable.Callback methods
| ||||||||||
boolean | isStateful() | ||||||||||
Drawable | mutate() | ||||||||||
void | scheduleDrawable(Drawable who, Runnable what, long when) | ||||||||||
void | setAlpha(int alpha) | ||||||||||
void | setColorFilter(ColorFilter colorFilter) | ||||||||||
void | setDither(boolean dither) | ||||||||||
Drawable |
setDrawable(int index, Drawable drawable)
Sets a new drawable at the specified index, and return the previous drawable, if any.
| ||||||||||
void | setFilterBitmap(boolean filterBitmap) | ||||||||||
void | setHotspot(float x, float y) | ||||||||||
void |
setTransformCallback(TransformCallback transformCallback)
TransformationCallbackSetter method
| ||||||||||
boolean | setVisible(boolean visible, boolean restart) | ||||||||||
void | unscheduleDrawable(Drawable who, Runnable what) |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | onBoundsChange(Rect bounds) | ||||||||||
boolean | onLevelChange(int level) | ||||||||||
boolean | onStateChange(int[] state) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.graphics.drawable.Drawable
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.graphics.drawable.Drawable.Callback
| |||||||||||
From interface
com.facebook.drawee.drawable.TransformAwareDrawable
| |||||||||||
From interface
com.facebook.drawee.drawable.TransformCallback
|
Constructs a new layer drawable.
layers | the layers that this drawable displays |
---|
Gets the drawable at the specified index.
index | index of drawable to get |
---|
Gets the number of layers.
Called when the drawable needs to get its root bounds.
bounds | The root bounds of the drawable. |
---|
TransformationCallback methods
transform | Matrix that is applied to the drawable by the parent drawables. |
---|
Drawable.Callback methods
Sets a new drawable at the specified index, and return the previous drawable, if any.
TransformationCallbackSetter method
transformCallback | the transform callback to be set |
---|