public abstract class Animation
extends java.lang.Object
run()
method which should bootstrap the animation. Then in each animation frame we expect
animation engine to call onUpdate(float)
with a float progress which then will be transferred
to the underlying AnimationPropertyUpdater
instance.
Animation engine should support animation cancelling by monitoring the returned value of
onUpdate(float)
. In case of returning false, animation should be considered cancelled and
engine should not attempt to call onUpdate(float)
again.Constructor and Description |
---|
Animation(int animationID,
AnimationPropertyUpdater propertyUpdater) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the animation.
|
protected void |
finish()
Animation engine should call this method when the animation is finished.
|
int |
getAnimationID() |
protected boolean |
onUpdate(float value)
Animation engine should call this method for every animation frame passing animation progress
value as a parameter.
|
abstract void |
run() |
void |
setAnimationListener(AnimationListener animationListener) |
void |
start(android.view.View view) |
public Animation(int animationID, AnimationPropertyUpdater propertyUpdater)
public void setAnimationListener(AnimationListener animationListener)
public final void start(android.view.View view)
public abstract void run()
protected final boolean onUpdate(float value)
protected final void finish()
public final void cancel()
public int getAnimationID()