public class MatrixDrawable<T extends Drawable> extends Drawable implements Touchable, TransitionUtils.BoundsCallback
Modifier and Type | Field and Description |
---|---|
static int |
UNSET |
Constructor and Description |
---|
MatrixDrawable() |
Modifier and Type | Method and Description |
---|---|
void |
bind(int width,
int height)
Applies the given dimensions to the drawable.
|
void |
draw(Canvas canvas) |
int |
getChangingConfigurations() |
Drawable |
getCurrent() |
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
int |
getMinimumHeight() |
int |
getMinimumWidth() |
T |
getMountedDrawable() |
int |
getOpacity() |
boolean |
getPadding(Rect padding) |
int[] |
getState() |
Region |
getTransparentRegion() |
Rect |
getVisualBounds() |
void |
invalidateDrawable(Drawable who) |
boolean |
isStateful() |
void |
mount(T drawable)
Sets the necessary artifacts to display the given drawable.
|
void |
mount(T drawable,
DrawableMatrix matrix) |
protected boolean |
onLevelChange(int level) |
boolean |
onTouchEvent(MotionEvent event,
View host) |
void |
onWidthHeightBoundsApplied(int width,
int height) |
void |
onXYBoundsApplied(int x,
int y) |
void |
scheduleDrawable(Drawable who,
java.lang.Runnable what,
long when) |
void |
setAlpha(int alpha) |
void |
setBounds(int left,
int top,
int right,
int bottom) |
void |
setBounds(Rect bounds) |
void |
setChangingConfigurations(int configs) |
void |
setColorFilter(ColorFilter cf) |
void |
setDither(boolean dither) |
void |
setFilterBitmap(boolean filter) |
boolean |
setState(int[] stateSet) |
boolean |
setVisible(boolean visible,
boolean restart) |
boolean |
shouldHandleTouchEvent(MotionEvent event) |
void |
unmount() |
void |
unscheduleDrawable(Drawable who,
java.lang.Runnable what) |
public static final int UNSET
public void mount(T drawable, DrawableMatrix matrix)
public void mount(T drawable)
drawable
- The drawable to be drawn.public void bind(int width, int height)
width
- The width of the drawable to be drawn.height
- The height of the drawable to be drawn.public void setBounds(int left, int top, int right, int bottom)
public void setBounds(Rect bounds)
public void unmount()
public T getMountedDrawable()
public Rect getVisualBounds()
public void draw(Canvas canvas)
public void setChangingConfigurations(int configs)
public int getChangingConfigurations()
public void setDither(boolean dither)
public void setFilterBitmap(boolean filter)
public void setAlpha(int alpha)
public void setColorFilter(ColorFilter cf)
public boolean isStateful()
public boolean setState(int[] stateSet)
public int[] getState()
public Drawable getCurrent()
public boolean setVisible(boolean visible, boolean restart)
public int getOpacity()
public Region getTransparentRegion()
public int getIntrinsicWidth()
public int getIntrinsicHeight()
public int getMinimumWidth()
public int getMinimumHeight()
public boolean getPadding(Rect padding)
protected boolean onLevelChange(int level)
public void invalidateDrawable(Drawable who)
public void scheduleDrawable(Drawable who, java.lang.Runnable what, long when)
public void unscheduleDrawable(Drawable who, java.lang.Runnable what)
public boolean onTouchEvent(MotionEvent event, View host)
onTouchEvent
in interface Touchable
public boolean shouldHandleTouchEvent(MotionEvent event)
shouldHandleTouchEvent
in interface Touchable
public void onWidthHeightBoundsApplied(int width, int height)
onWidthHeightBoundsApplied
in interface TransitionUtils.BoundsCallback
public void onXYBoundsApplied(int x, int y)
onXYBoundsApplied
in interface TransitionUtils.BoundsCallback