public class LayerDrawable extends Drawable implements Drawable.Callback
Drawable.Callback, Drawable.ConstantState| Constructor and Description |
|---|
LayerDrawable(Drawable[] layers) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(Canvas canvas) |
Drawable |
findDrawableByLayerId(int id) |
int |
getChangingConfigurations() |
Drawable.ConstantState |
getConstantState() |
Drawable |
getDrawable(int index) |
int |
getId(int index) |
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
int |
getNumberOfLayers() |
int |
getOpacity() |
boolean |
getPadding(Rect padding) |
void |
inflate(Resources r,
org.xmlpull.v1.XmlPullParser parser,
AttributeSet attrs) |
void |
invalidateDrawable(Drawable who) |
boolean |
isStateful() |
Drawable |
mutate() |
protected void |
onBoundsChange(Rect bounds) |
protected boolean |
onLevelChange(int level) |
protected boolean |
onStateChange(int[] state) |
void |
scheduleDrawable(Drawable who,
Runnable what,
long when) |
void |
setAlpha(int alpha) |
void |
setColorFilter(ColorFilter cf) |
void |
setDither(boolean dither) |
boolean |
setDrawableByLayerId(int id,
Drawable drawable) |
void |
setId(int index,
int id) |
void |
setLayerInset(int index,
int l,
int t,
int r,
int b) |
void |
setOpacity(int opacity) |
boolean |
setVisible(boolean visible,
boolean restart) |
void |
unscheduleDrawable(Drawable who,
Runnable what) |
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getCurrent, getLevel, getMinimumHeight, getMinimumWidth, getState, getTransparentRegion, invalidateSelf, isVisible, jumpToCurrentState, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setLevel, setState, unscheduleSelfpublic LayerDrawable(Drawable[] layers)
public void inflate(Resources r, org.xmlpull.v1.XmlPullParser parser, AttributeSet attrs) throws org.xmlpull.v1.XmlPullParserException, IOException
inflate in class Drawableorg.xmlpull.v1.XmlPullParserExceptionIOExceptionpublic Drawable findDrawableByLayerId(int id)
public void setId(int index,
int id)
public int getNumberOfLayers()
public Drawable getDrawable(int index)
public int getId(int index)
public boolean setDrawableByLayerId(int id,
Drawable drawable)
public void setLayerInset(int index,
int l,
int t,
int r,
int b)
public void invalidateDrawable(Drawable who)
invalidateDrawable in interface Drawable.Callbackpublic void scheduleDrawable(Drawable who, Runnable what, long when)
scheduleDrawable in interface Drawable.Callbackpublic void unscheduleDrawable(Drawable who, Runnable what)
unscheduleDrawable in interface Drawable.Callbackpublic int getChangingConfigurations()
getChangingConfigurations in class Drawablepublic boolean getPadding(Rect padding)
getPadding in class Drawablepublic boolean setVisible(boolean visible,
boolean restart)
setVisible in class Drawablepublic void setColorFilter(ColorFilter cf)
setColorFilter in class Drawablepublic void setOpacity(int opacity)
public int getOpacity()
getOpacity in class Drawablepublic boolean isStateful()
isStateful in class Drawableprotected boolean onStateChange(int[] state)
onStateChange in class Drawableprotected boolean onLevelChange(int level)
onLevelChange in class Drawableprotected void onBoundsChange(Rect bounds)
onBoundsChange in class Drawablepublic int getIntrinsicWidth()
getIntrinsicWidth in class Drawablepublic int getIntrinsicHeight()
getIntrinsicHeight in class Drawablepublic Drawable.ConstantState getConstantState()
getConstantState in class DrawableCopyright © 2008-2013. All Rights Reserved.