Android Animation for Titanium
Provides access to Honeycomb+ Animation APIs
 All Classes Functions Variables Pages
Public Member Functions | Static Public Attributes | List of all members
AndroidAnimation Class Reference

This is the module itself. More...

Inherits KrollModule.

Public Member Functions

.method.getProperty
ObjectAnimatorFactory 
getObjectAnimator ()
 Returns a factory for the ObjectAnimator, from which you can call ofInt or ofFloat to instantiate an ObjectAnimator. More...
 
.method.getProperty
ViewPropertyAnimatorFactory 
getViewPropertyAnimator ()
 Returns a factory for the ViewPropertyAnimator, from which you can call animate to instantiate a ViewPropertyAnimator. More...
 
.method float toPixels (TiViewProxy view, Object originalValue,@Kroll.argument(optional=true) String direction)
 Converts dips, sips, etc. More...
 

Static Public Attributes

.constant static final int INT_EVALUATOR = 1
 Constant for use when specifying that animation should use the Android IntEvaluator. More...
 
.constant static final int FLOAT_EVALUATOR = 2
 Constant for use when specifying that animation should use the Android FloatEvaluator. More...
 
.constant static final int ARGB_EVALUATOR = 3
 Constant for use when specifying that animation should use the Android ArgbEvaluator. More...
 
.constant static final int INFINITE = ValueAnimator.INFINITE
 Constant indicating that the animation should repeat forever. More...
 
.constant static final int RESTART = ValueAnimator.RESTART
 Constant indicating that when "repeating", the animation should start over from the beginning. More...
 
.constant static final int REVERSE = ValueAnimator.REVERSE
 Constant indicating that when "repeating", the animation should reverse itself. More...
 
.constant static final int ACCELERATE_INTERPOLATOR = 1
 Constant for the accelerate interpolator. More...
 
.constant static final int DECELERATE_INTERPOLATOR = 2
 Constant for the decelerate interpolator. More...
 
.constant static final int ACCELERATE_DECELERATE_INTERPOLATOR = 3
 Constant for the accelerate decelerate interpolator. More...
 
.constant static final int ANTICIPATE_INTERPOLATOR = 4
 Constant for the anticipate interpolator. More...
 
.constant static final int ANTICIPATE_OVERSHOOT_INTERPOLATOR = 5
 Constant for the anticipate overshoot interpolator. More...
 
.constant static final int BOUNCE_INTERPOLATOR = 6
 Constant for the bounce interpolator. More...
 
.constant static final int CYCLE_INTERPOLATOR = 7
 Constant for the cycle interpolator. More...
 
.constant static final int OVERSHOOT_INTERPOLATOR = 8
 Constant for the overshoot interpolator. More...
 
.constant static final int LINEAR_INTERPOLATOR = 9
 Constant for the linear interpolator. More...
 

Detailed Description

This is the module itself.

In your Javascript code you won't use the name AndroidAnimation itself, but instead set a variable to the result of requireing the module using its full id. For example:

 var animationModule = require("com.billdawson.timodules.animation);
Since
1.0

Member Function Documentation

.method.getProperty ObjectAnimatorFactory getObjectAnimator ( )
inline

Returns a factory for the ObjectAnimator, from which you can call ofInt or ofFloat to instantiate an ObjectAnimator.

This is a property getter, so in Javascript you can access it directly as a property (module.objectAnimator).

Returns
Factory object with which to instantiate an ObjectAnimator.
Since
1.0
.method.getProperty ViewPropertyAnimatorFactory getViewPropertyAnimator ( )
inline

Returns a factory for the ViewPropertyAnimator, from which you can call animate to instantiate a ViewPropertyAnimator.

This is a property getter, so in Javascript you can access it directly as a property (module.viewPropertyAnimator).

Returns
Factory object with which to instantiate a ViewPropertyAnimator.
Since
1.0
.method float toPixels ( TiViewProxy  view,
Object  originalValue,
@Kroll.argument(optional=true) String  direction 
)
inline

Converts dips, sips, etc.

into pixels, taking density into account. Useful when animating using the [ObjectAnimator](ObjectAnimator_], which does not perform such calculations automatically for you. (The ViewPropertyAnimator, however, will do these calculations for you, so when using it you will likely not need to be using this function.)

Parameters
viewThe view you will eventually be animating, or any view on the same window. This is needed to determine the density of the hosting screen.
originalValueA number with a unit specifier, such as "12dp" if you wished to convert 12dp to pixels.
direction(Optional) "horizontal" (default) or "vertical". Only relevant if converting from inches, centimeters or millimeters.
Returns
Number of pixels
Since
1.0

Member Data Documentation

.constant static final int ACCELERATE_DECELERATE_INTERPOLATOR = 3
static

Constant for the accelerate decelerate interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int ACCELERATE_INTERPOLATOR = 1
static

Constant for the accelerate interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int ANTICIPATE_INTERPOLATOR = 4
static

Constant for the anticipate interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int ANTICIPATE_OVERSHOOT_INTERPOLATOR = 5
static

Constant for the anticipate overshoot interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int ARGB_EVALUATOR = 3
static

Constant for use when specifying that animation should use the Android ArgbEvaluator.

You will want to use this evaluator if you are animating view color properties, such as backgroundColor.

For more information about evaluators, see the Android documenation.

See Also
ObjectAnimator_::setEvaluator(int)
Since
1.0
.constant static final int BOUNCE_INTERPOLATOR = 6
static

Constant for the bounce interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int CYCLE_INTERPOLATOR = 7
static

Constant for the cycle interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int DECELERATE_INTERPOLATOR = 2
static

Constant for the decelerate interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int FLOAT_EVALUATOR = 2
static

Constant for use when specifying that animation should use the Android FloatEvaluator.

You generally won't need to use this directly, because if you create an ObjectAnimator to animate float values, it will automatically use this type of evaluator.

For more information about evaluators, see the Android documenation.

See Also
ObjectAnimator_::setEvaluator(int)
Since
1.0
.constant static final int INFINITE = ValueAnimator.INFINITE
static

Constant indicating that the animation should repeat forever.

You can read about INFINITE, RESTART and REVERSE in the Android documentation.

See Also
ObjectAnimator_::setRepeatCount(int)
Since
1.0
.constant static final int INT_EVALUATOR = 1
static

Constant for use when specifying that animation should use the Android IntEvaluator.

You generally won't need to use this directly, because if you create an ObjectAnimator to animate integer values, it will automatically use this type of evaluator.

For more information about evaluators, see the Android documenation.

See Also
ObjectAnimator_::setEvaluator(int)
Since
1.0
.constant static final int LINEAR_INTERPOLATOR = 9
static

Constant for the linear interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int OVERSHOOT_INTERPOLATOR = 8
static

Constant for the overshoot interpolator.

Read about different animation interpolators in the Android documentation.

See Also
ObjectAnimator_::setInterpolator(int)
AnimatorSet_::setInterpolator(int)
ViewPropertyAnimator_::setInterpolator(int, Object...)
Since
1.0
.constant static final int RESTART = ValueAnimator.RESTART
static

Constant indicating that when "repeating", the animation should start over from the beginning.

You can read about INFINITE, RESTART and REVERSE in the Android documentation.

See Also
ObjectAnimator_::setRepeatMode(int)
Since
1.0
.constant static final int REVERSE = ValueAnimator.REVERSE
static

Constant indicating that when "repeating", the animation should reverse itself.

You can read about INFINITE, RESTART and REVERSE in the Android documentation.

See Also
ObjectAnimator_::setRepeatMode(int)
Since
1.0

The documentation for this class was generated from the following file: