Build 1.0_r1(from source)

android.view.animation
Class AnimationUtils

java.lang.Object
  extended by android.view.animation.AnimationUtils

public class AnimationUtils
extends Object

Defines common utilities for working with animations.


Constructor Summary
AnimationUtils()
           
 
Method Summary
static long currentAnimationTimeMillis()
          Returns the current animation time in milliseconds.
static Animation loadAnimation(Context context, int id)
          Loads an Animation object from a resource
static Interpolator loadInterpolator(Context context, int id)
          Loads an Interpolator object from a resource
static LayoutAnimationController loadLayoutAnimation(Context context, int id)
           
static Animation makeInAnimation(Context c, boolean fromLeft)
          Make an animation for objects becoming visible.
static Animation makeInChildBottomAnimation(Context c)
          Make an animation for objects becoming visible.
static Animation makeOutAnimation(Context c, boolean toRight)
          Make an animation for objects becoming invisible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationUtils

public AnimationUtils()
Method Detail

currentAnimationTimeMillis

public static long currentAnimationTimeMillis()
Returns the current animation time in milliseconds. This time should be used when invoking Animation.setStartTime(long). Refer to SystemClock for more information about the different available clocks. The clock used by this method is not the "wall" clock (it is not System.currentTimeMillis()).

Returns:
the current animation time in milliseconds
See Also:
SystemClock

loadAnimation

public static Animation loadAnimation(Context context,
                                      int id)
                               throws Resources.NotFoundException
Loads an Animation object from a resource

Parameters:
context - Application context used to access resources
id - The resource id of the animation to load
Returns:
The animation object reference by the specified id
Throws:
Resources.NotFoundException - when the animation cannot be loaded

loadLayoutAnimation

public static LayoutAnimationController loadLayoutAnimation(Context context,
                                                            int id)
                                                     throws Resources.NotFoundException
Throws:
Resources.NotFoundException

makeInAnimation

public static Animation makeInAnimation(Context c,
                                        boolean fromLeft)
Make an animation for objects becoming visible. Uses a slide and fade effect.

Parameters:
c - Context for loading resources
fromLeft - is the object to be animated coming from the left
Returns:
The new animation

makeOutAnimation

public static Animation makeOutAnimation(Context c,
                                         boolean toRight)
Make an animation for objects becoming invisible. Uses a slide and fade effect.

Parameters:
c - Context for loading resources
toRight - is the object to be animated exiting to the right
Returns:
The new animation

makeInChildBottomAnimation

public static Animation makeInChildBottomAnimation(Context c)
Make an animation for objects becoming visible. Uses a slide up and fade effect.

Parameters:
c - Context for loading resources
Returns:
The new animation

loadInterpolator

public static Interpolator loadInterpolator(Context context,
                                            int id)
                                     throws Resources.NotFoundException
Loads an Interpolator object from a resource

Parameters:
context - Application context used to access resources
id - The resource id of the animation to load
Returns:
The animation object reference by the specified id
Throws:
Resources.NotFoundException

Build 1.0_r1(from source)

Please submit a feedback, bug or feature