public class TouchEffectDrawable extends StatePaintDrawable implements Animatable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
TouchEffectDrawable.ClipFactory |
static interface |
TouchEffectDrawable.PerformClicker
This drawable call view perform by interface
|
static class |
TouchEffectDrawable.ShaderFactory
Base class defines a factory object that is called each time the drawable
is resized (has a new width or height).
|
Drawable.Callback, Drawable.ConstantState| 限定符和类型 | 字段和说明 |
|---|---|
static int |
ANIM_DELAY_START_TIME |
static int |
ANIM_ENTER_DURATION |
static int |
ANIM_EXIT_DURATION |
protected boolean |
isTouchReleased |
mPaintANIMATION_DURATION, FRAME_DURATION| 构造器和说明 |
|---|
TouchEffectDrawable() |
TouchEffectDrawable(Effect s) |
TouchEffectDrawable(Effect s,
ColorStateList color) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearMutated() |
void |
draw(Canvas canvas,
Paint paint)
Subclasses should implement this method to do the actual drawing
|
int |
getChangingConfigurations() |
TouchEffectDrawable.ClipFactory |
getClipFactory()
Returns the ClipFactory used by this TouchEffectDrawable Canvas.clip.. method
|
Drawable.ConstantState |
getConstantState() |
Effect |
getEffect()
Returns the Effect of this EffectDrawable.
|
int |
getEnterDuration() |
Interpolator |
getEnterInterpolator() |
int |
getExitDuration() |
Interpolator |
getExitInterpolator() |
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
int |
getOpacity() |
void |
getOutline(Outline outline) |
boolean |
getPadding(Rect padding) |
TouchEffectDrawable.ShaderFactory |
getShaderFactory()
Returns the ShaderFactory used by this TouchEffectDrawable for requesting a
Shader. |
boolean |
isRunning()
Return this draw animation is running
|
Drawable |
mutate() |
protected void |
onBoundsChange(Rect bounds) |
protected void |
onDraw(Effect shape,
Canvas canvas,
Paint paint)
Called from the drawable's draw() method after the canvas has been set to
draw the shape at (0,0).
|
protected void |
onEnterAnimateEnd() |
protected void |
onEnterAnimateUpdate(float factor) |
protected void |
onExitAnimateEnd() |
protected void |
onExitAnimateUpdate(float factor) |
boolean |
onTouch(MotionEvent event) |
protected void |
onTouchCancel(float x,
float y) |
protected void |
onTouchDown(float x,
float y) |
protected void |
onTouchMove(float x,
float y) |
protected void |
onTouchReleased(float x,
float y) |
boolean |
performClick(TouchEffectDrawable.PerformClicker clicker) |
protected void |
postPerformClick() |
void |
setClipFactory(TouchEffectDrawable.ClipFactory fact)
Sets a ClipFactory to which requests for
Canvas clip.. method object will be made. |
void |
setEffect(Effect s)
Sets the Effect of this EffectDrawable.
|
void |
setEnterDuration(float factor) |
void |
setEnterInterpolator(Interpolator interpolator) |
void |
setExitDuration(float factor) |
void |
setExitInterpolator(Interpolator interpolator) |
void |
setIntrinsicHeight(int height)
Sets the intrinsic (default) height for this shape.
|
void |
setIntrinsicWidth(int width)
Sets the intrinsic (default) width for this shape.
|
void |
setPadding(int left,
int top,
int right,
int bottom)
Sets padding for the shape.
|
void |
setPadding(Rect padding)
Sets padding for this shape, defined by a Rect object.
|
void |
setShaderFactory(TouchEffectDrawable.ShaderFactory fact)
Sets a ShaderFactory to which requests for a
Shader object will be made. |
void |
start() |
void |
stop() |
draw, getPaint, isStateful, onColorChange, onStateChange, setColorFilter, setDither, setTintList, setTintModechangeColor, getAlpha, getColor, getColorStateList, setAlpha, setColor, setColorStateListapplyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getColorFilter, getCurrent, getDirtyBounds, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isVisible, jumpToCurrentState, onLayoutDirectionChanged, onLevelChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setVisible, unscheduleSelfpublic static final int ANIM_ENTER_DURATION
public static final int ANIM_EXIT_DURATION
public static final int ANIM_DELAY_START_TIME
protected boolean isTouchReleased
public TouchEffectDrawable()
public TouchEffectDrawable(Effect s)
public TouchEffectDrawable(Effect s, ColorStateList color)
public Effect getEffect()
public void setEffect(Effect s)
public void setShaderFactory(TouchEffectDrawable.ShaderFactory fact)
Shader object will be made.fact - an instance of your ShaderFactory implementationpublic TouchEffectDrawable.ShaderFactory getShaderFactory()
Shader.public void setClipFactory(TouchEffectDrawable.ClipFactory fact)
Canvas clip.. method object will be made.fact - an instance of your ClipFactory implementationpublic TouchEffectDrawable.ClipFactory getClipFactory()
public void setPadding(int left,
int top,
int right,
int bottom)
left - padding for the left side (in pixels)top - padding for the top (in pixels)right - padding for the right side (in pixels)bottom - padding for the bottom (in pixels)public void setPadding(Rect padding)
public void setIntrinsicWidth(int width)
width - the intrinsic width (in pixels)public void setIntrinsicHeight(int height)
height - the intrinsic height (in pixels)public int getIntrinsicWidth()
getIntrinsicWidth 在类中 Drawablepublic int getIntrinsicHeight()
getIntrinsicHeight 在类中 Drawablepublic boolean getPadding(Rect padding)
getPadding 在类中 Drawableprotected void onDraw(Effect shape, Canvas canvas, Paint paint)
public void draw(Canvas canvas, Paint paint)
StatePaintDrawabledraw 在类中 StatePaintDrawablecanvas - The current Canvas to draw intopaint - The Paint the Paint object that defines with the current
ColorStateList colorpublic int getChangingConfigurations()
getChangingConfigurations 在类中 Drawablepublic int getOpacity()
getOpacity 在类中 StatePaintDrawableprotected void onBoundsChange(Rect bounds)
onBoundsChange 在类中 Drawablepublic void getOutline(Outline outline)
getOutline 在类中 Drawablepublic Drawable.ConstantState getConstantState()
getConstantState 在类中 Drawablepublic void clearMutated()
public boolean onTouch(MotionEvent event)
protected void onTouchCancel(float x,
float y)
protected void onTouchDown(float x,
float y)
protected void onTouchReleased(float x,
float y)
protected void onTouchMove(float x,
float y)
public boolean performClick(TouchEffectDrawable.PerformClicker clicker)
protected void postPerformClick()
public void start()
start 在接口中 Animatablepublic void stop()
stop 在接口中 Animatablepublic boolean isRunning()
isRunning 在接口中 Animatablepublic int getEnterDuration()
public int getExitDuration()
public void setEnterDuration(float factor)
public void setExitDuration(float factor)
public Interpolator getEnterInterpolator()
public Interpolator getExitInterpolator()
public void setEnterInterpolator(Interpolator interpolator)
public void setExitInterpolator(Interpolator interpolator)
protected void onEnterAnimateUpdate(float factor)
protected void onExitAnimateUpdate(float factor)
protected void onEnterAnimateEnd()
protected void onExitAnimateEnd()