Back to Fresco

ArrayDrawable

docs/javadoc/reference/com/facebook/drawee/drawable/ArrayDrawable.html

3.6.024.3 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Enums

Packages | Classes

Summary: Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]

public class

ArrayDrawable

extends Drawable
implements Drawable.Callback TransformAwareDrawableTransformCallback

| java.lang.Object | | ↳ | android.graphics.drawable.Drawable | | | ↳ | com.facebook.drawee.drawable.ArrayDrawable |

| Known Direct Subclasses

FadeDrawable

| FadeDrawable | A drawable that fades to the specific layer. |

|

Class Overview

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.

Summary

Public Constructors
Constructs a new layer drawable.
Public Methods
void
Drawable
Gets the drawable at the specified index.
DrawableParent
Gets the DrawableParent for index.
int
int
int
Gets the number of layers.
int
boolean
void
Called when the drawable needs to get its root bounds.
void
TransformationCallback methods
void
Drawable.Callback methods
boolean
Drawable
void
void
void
void
Drawable
Sets a new drawable at the specified index, and return the previous drawable, if any.
void
void
void
TransformationCallbackSetter method
boolean
void
Protected Methods
void
boolean
boolean

| [Expand] Inherited Methods | | --- | | From class android.graphics.drawable.Drawable

| void | applyTheme(Resources.Theme arg0) | | boolean | canApplyTheme() | | void | clearColorFilter() | | final Rect | copyBounds() | | final void | copyBounds(Rect arg0) | | static Drawable | createFromPath(String arg0) | | static Drawable | createFromResourceStream(Resources arg0, TypedValue arg1, InputStream arg2, String arg3, BitmapFactory.Options arg4) | | static Drawable | createFromResourceStream(Resources arg0, TypedValue arg1, InputStream arg2, String arg3) | | static Drawable | createFromStream(InputStream arg0, String arg1) | | static Drawable | createFromXml(Resources arg0, XmlPullParser arg1) | | static Drawable | createFromXml(Resources arg0, XmlPullParser arg1, Resources.Theme arg2) | | static Drawable | createFromXmlInner(Resources arg0, XmlPullParser arg1, AttributeSet arg2, Resources.Theme arg3) | | static Drawable | createFromXmlInner(Resources arg0, XmlPullParser arg1, AttributeSet arg2) | | abstract void | draw(Canvas arg0) | | int | getAlpha() | | final Rect | getBounds() | | Drawable.Callback | getCallback() | | int | getChangingConfigurations() | | ColorFilter | getColorFilter() | | Drawable.ConstantState | getConstantState() | | Drawable | getCurrent() | | Rect | getDirtyBounds() | | void | getHotspotBounds(Rect arg0) | | int | getIntrinsicHeight() | | int | getIntrinsicWidth() | | int | getLayoutDirection() | | final int | getLevel() | | int | getMinimumHeight() | | int | getMinimumWidth() | | abstract int | getOpacity() | | void | getOutline(Outline arg0) | | boolean | getPadding(Rect arg0) | | int[] | getState() | | Region | getTransparentRegion() | | void | inflate(Resources arg0, XmlPullParser arg1, AttributeSet arg2, Resources.Theme arg3) | | void | inflate(Resources arg0, XmlPullParser arg1, AttributeSet arg2) | | void | invalidateSelf() | | boolean | isAutoMirrored() | | boolean | isFilterBitmap() | | boolean | isStateful() | | final boolean | isVisible() | | void | jumpToCurrentState() | | Drawable | mutate() | | void | onBoundsChange(Rect arg0) | | boolean | onLayoutDirectionChanged(int arg0) | | boolean | onLevelChange(int arg0) | | boolean | onStateChange(int[] arg0) | | static int | resolveOpacity(int arg0, int arg1) | | void | scheduleSelf(Runnable arg0, long arg1) | | abstract void | setAlpha(int arg0) | | void | setAutoMirrored(boolean arg0) | | void | setBounds(int arg0, int arg1, int arg2, int arg3) | | void | setBounds(Rect arg0) | | final void | setCallback(Drawable.Callback arg0) | | void | setChangingConfigurations(int arg0) | | void | setColorFilter(int arg0, PorterDuff.Mode arg1) | | abstract void | setColorFilter(ColorFilter arg0) | | void | setDither(boolean arg0) | | void | setFilterBitmap(boolean arg0) | | void | setHotspot(float arg0, float arg1) | | void | setHotspotBounds(int arg0, int arg1, int arg2, int arg3) | | final boolean | setLayoutDirection(int arg0) | | final boolean | setLevel(int arg0) | | boolean | setState(int[] arg0) | | void | setTint(int arg0) | | void | setTintList(ColorStateList arg0) | | void | setTintMode(PorterDuff.Mode arg0) | | boolean | setVisible(boolean arg0, boolean arg1) | | void | unscheduleSelf(Runnable arg0) |

| | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

| | From interface android.graphics.drawable.Drawable.Callback

| abstract void | invalidateDrawable(Drawable arg0) | | abstract void | scheduleDrawable(Drawable arg0, Runnable arg1, long arg2) | | abstract void | unscheduleDrawable(Drawable arg0, Runnable arg1) |

| | From interface com.facebook.drawee.drawable.TransformAwareDrawable

| abstract void | setTransformCallback(TransformCallback transformCallback) Sets a transform callback. |

| | From interface com.facebook.drawee.drawable.TransformCallback

| abstract void | getRootBounds(RectF bounds) Called when the drawable needs to get its root bounds. | | abstract void | getTransform(Matrix transform) Called when the drawable needs to get all matrices applied to it. |

|

Public Constructors

public ArrayDrawable(Drawable[] layers)

Constructs a new layer drawable.

Parameters

| layers | the layers that this drawable displays |

Public Methods

public void draw(Canvas canvas)

public Drawable getDrawable(int index)

Gets the drawable at the specified index.

Parameters

| index | index of drawable to get |

Returns
  • drawable at the specified index

public DrawableParent getDrawableParentForIndex(int index)

Gets the DrawableParent for index.

public int getIntrinsicHeight()

public int getIntrinsicWidth()

public int getNumberOfLayers()

Gets the number of layers.

Returns
  • number of layers

public int getOpacity()

public boolean getPadding(Rect padding)

public void getRootBounds(RectF bounds)

Called when the drawable needs to get its root bounds.

Parameters

| bounds | The root bounds of the drawable. |

public void getTransform(Matrix transform)

TransformationCallback methods

Parameters

| transform | Matrix that is applied to the drawable by the parent drawables. |

public void invalidateDrawable(Drawable who)

Drawable.Callback methods

public boolean isStateful()

public Drawable mutate()

public void scheduleDrawable(Drawable who, Runnable what, long when)

public void setAlpha(int alpha)

public void setColorFilter(ColorFilter colorFilter)

public void setDither(boolean dither)

public Drawable setDrawable(int index, Drawable drawable)

Sets a new drawable at the specified index, and return the previous drawable, if any.

public void setFilterBitmap(boolean filterBitmap)

public void setHotspot(float x, float y)

public void setTransformCallback(TransformCallback transformCallback)

TransformationCallbackSetter method

Parameters

| transformCallback | the transform callback to be set |

public boolean setVisible(boolean visible, boolean restart)

public void unscheduleDrawable(Drawable who, Runnable what)

Protected Methods

protected void onBoundsChange(Rect bounds)

protected boolean onLevelChange(int level)

protected boolean onStateChange(int[] state)

+Generated by Doclava. +