Methods Summary |
---|
public boolean | draw(android.graphics.Canvas canvas)Draw into the provided canvas. Assumes that the canvas has been rotated
accordingly and the size has been set. The effect will be drawn the full
width of X=0 to X=width, beginning from Y=0 and extending to some factor <
1.f of height.
return IMPL.draw(mEdgeEffect, canvas);
|
public void | finish()Immediately finish the current animation.
After this call {@link #isFinished()} will return true.
IMPL.finish(mEdgeEffect);
|
public boolean | isFinished()Reports if this EdgeEffectCompat's animation is finished. If this method returns false
after a call to {@link #draw(Canvas)} the host widget should schedule another
drawing pass to continue the animation.
return IMPL.isFinished(mEdgeEffect);
|
public boolean | onAbsorb(int velocity)Call when the effect absorbs an impact at the given velocity.
Used when a fling reaches the scroll boundary.
When using a {@link android.widget.Scroller} or {@link android.widget.OverScroller},
the method getCurrVelocity will provide a reasonable approximation
to use here.
return IMPL.onAbsorb(mEdgeEffect, velocity);
|
public boolean | onPull(float deltaDistance)A view should call this when content is pulled away from an edge by the user.
This will update the state of the current visual effect and its associated animation.
The host view should always {@link android.view.View#invalidate()} if this method
returns true and draw the results accordingly.
return IMPL.onPull(mEdgeEffect, deltaDistance);
|
public boolean | onRelease()Call when the object is released after being pulled.
This will begin the "decay" phase of the effect. After calling this method
the host view should {@link android.view.View#invalidate()} if this method
returns true and thereby draw the results accordingly.
return IMPL.onRelease(mEdgeEffect);
|
public void | setSize(int width, int height)Set the size of this edge effect in pixels.
IMPL.setSize(mEdgeEffect, width, height);
|