Alloy.builtins.animation

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);

Defined By

Properties

Alloy.builtins.animation
HORIZONTAL : String

To be used as direction for the flip-method

To be used as direction for the flip-method

Alloy.builtins.animation
VERTICAL : String

To be used as direction for the flip-method

To be used as direction for the flip-method

Defined By

Methods

Alloy.builtins.animation
( view, animations, [finishCallback] )
Executes a series of animations on the target view. ...

Executes a series of animations on the target view.

Parameters

  • view : Titanium.UI.View

    View to animate.

  • animations : Titanium.UI.Animation[]

    A set of animations to execute on view in sequence.

  • finishCallback : function() (optional)

    Callback to invoke once the chain animation is complete.

Returns

  • void
Alloy.builtins.animation
( from, to, duration, [finishCallback] )
Transitions from one view to another using a cross-fade animation. ...

Transitions from one view to another using a cross-fade animation.

Parameters

  • from : Titanium.UI.View

    View to fade out.

  • to : Titanium.UI.View

    View to fade in.

  • duration : Number

    Fade duration in milliseconds.

  • finishCallback : function() (optional)

    Callback function, invoked after the fade completes.

Returns

  • void
Alloy.builtins.animation
( from, duration, container, [finishCallback] )
Fades out a view then removes it from its parent view. ...

Fades out a view then removes it from its parent view.

Parameters

  • from : Titanium.UI.View

    View to remove.

  • duration : Number

    Fade duration in milliseconds.

  • container : Titanium.UI.View

    Parent container view.

  • finishCallback : function() (optional)

    Callback function, invoked after the fadeAndRemove completes.

Returns

  • void
Alloy.builtins.animation
( to, duration, [finishCallback] )
Fades in the specified view. ...

Fades in the specified view.

Parameters

  • to : Titanium.UI.View

    View to fade in.

  • duration : Number

    Fade duration in milliseconds.

  • finishCallback : function() (optional)

    Callback function, invoked after the fadeIn completes.

Returns

  • void
Alloy.builtins.animation
( to, duration, [finishCallback] )
Fades out the specified view. ...

Fades out the specified view.

Parameters

  • to : Titanium.UI.View

    View to fade out.

  • duration : Number

    Fade duration in milliseconds.

  • finishCallback : function() (optional)

    Callback function, invoked after the fadeOut completes.

Returns

  • void
Alloy.builtins.animation
( view, [delay], [finishCallback] )
Flashes the target view twice, fading to partially transparent then back to fully-opaque. ...

Flashes the target view twice, fading to partially transparent then back to fully-opaque.

Parameters

  • view : Titanium.UI.View

    View to animate.

  • delay : Number (optional)

    If specified, animation starts after delay milliseconds.

  • finishCallback : function() (optional)

    Callback function, invoked after the flash completes.

Returns

  • void
Alloy.builtins.animation
( from, to, [direction], duration, [finishCallback] )
Transitions from one view to another using a 3D flip animation. ...

Transitions from one view to another using a 3D flip animation. The two views need to be positioned on top of each other.

  • 1.2.2
  • 1.2.2

Parameters

  • from : Titanium.UI.View

    View to fade out.

  • to : Titanium.UI.View

    View to fade in.

  • direction : String (optional)

    direction ('horizontal' or 'vertical') to flip.

  • duration : Number

    Fade duration in milliseconds.

  • finishCallback : function() (optional)

    Callback function, invoked after the fade completes.

Returns

  • void
Alloy.builtins.animation
( from, to, duration, [finishCallback] )
Transitions from one view to another using a horizontal flip animation. ...

Transitions from one view to another using a horizontal flip animation.

  • 1.2.2
  • 1.2.2

Parameters

  • from : Titanium.UI.View

    View to fade out.

  • to : Titanium.UI.View

    View to fade in.

  • duration : Number

    Fade duration in milliseconds.

  • finishCallback : function() (optional)

    Callback function, invoked after the fade completes.

Returns

  • void
Alloy.builtins.animation
( from, to, duration, [finishCallback] )
Transitions from one view to another using a vertical flip animation. ...

Transitions from one view to another using a vertical flip animation.

  • 1.2.2
  • 1.2.2

Parameters

  • from : Titanium.UI.View

    View to fade out.

  • to : Titanium.UI.View

    View to fade in.

  • duration : Number

    Fade duration in milliseconds.

  • finishCallback : function() (optional)

    Callback function, invoked after the fade completes.

Returns

  • void
Alloy.builtins.animation
( view, [finishCallback] )
Makes the specified view appear using a "pop-in" animation, which combines a fade-in with a slight expanding and cont...

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.

Parameters

  • view : Titanium.UI.View

    View to animate.

  • finishCallback : function() (optional)

    Callback function, invoked after the popIn completes.

Returns

  • void
Alloy.builtins.animation
( view, [delay], [finishCallback] )
Creates a shake animation, moving the target view back and forth rapidly several times. ...

Creates a shake animation, moving the target view back and forth rapidly several times.

Parameters

  • view : Titanium.UI.View

    View to animate.

  • delay : Number (optional)

    If specified, animation starts after delay milliseconds.

  • finishCallback : function() (optional)

    Callback function, invoked after the shake completes.

Returns

  • void