A collection of useful animation utilities. To use the animation builtin library,
all you need to do is require it with the alloy
root directory in your
require
call. For example:
var animation = require('alloy/animation'); animation.crossFade(view1, view2, 500, finishCallback);
To be used as direction for the flip-method
To be used as direction for the flip-method
To be used as direction for the flip-method
To be used as direction for the flip-method
Executes a series of animations on the target view.
View to animate.
A set of animations to execute on view
in sequence.
Callback to invoke once the chain animation is complete.
Transitions from one view to another using a cross-fade animation.
View to fade out.
View to fade in.
Fade duration in milliseconds.
Callback function, invoked after the fade completes.
Fades out a view then removes it from its parent view.
View to remove.
Fade duration in milliseconds.
Parent container view.
Callback function, invoked after the fadeAndRemove completes.
Fades in the specified view.
View to fade in.
Fade duration in milliseconds.
Callback function, invoked after the fadeIn completes.
Fades out the specified view.
View to fade out.
Fade duration in milliseconds.
Callback function, invoked after the fadeOut completes.
Flashes the target view twice, fading to partially transparent then back to fully-opaque.
View to animate.
If specified, animation starts after delay
milliseconds.
Callback function, invoked after the flash completes.
Transitions from one view to another using a 3D flip animation. The two views need to be positioned on top of each other.
View to fade out.
View to fade in.
direction ('horizontal' or 'vertical') to flip.
Fade duration in milliseconds.
Callback function, invoked after the fade completes.
Transitions from one view to another using a horizontal flip animation.
View to fade out.
View to fade in.
Fade duration in milliseconds.
Callback function, invoked after the fade completes.
Transitions from one view to another using a vertical flip animation.
View to fade out.
View to fade in.
Fade duration in milliseconds.
Callback function, invoked after the fade completes.
Makes the specified view appear using a "pop-in" animation, which combines a fade-in with a slight expanding and contracting animation, to call attention to the new view.
View to animate.
Callback function, invoked after the popIn completes.
Creates a shake animation, moving the target view back and forth rapidly several times.
View to animate.
If specified, animation starts after delay
milliseconds.
Callback function, invoked after the shake completes.