AnimationUtils
public
class
AnimationUtils
extends Object
Defines common utilities for working with animations.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
AnimationUtils
public AnimationUtils ()
Public methods
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 |
long |
the current animation time in milliseconds |
loadAnimation
public static Animation loadAnimation (Context context,
int id)
Loads an Animation
object from a resource
Parameters |
context |
Context : Application context used to access resources |
id |
int : The resource id of the animation to load |
Returns |
Animation |
The animation object referenced by the specified id |
loadInterpolator
public static Interpolator loadInterpolator (Context context,
int id)
Loads an Interpolator
object from a resource
Parameters |
context |
Context : Application context used to access resources |
id |
int : The resource id of the animation to load |
Returns |
Interpolator |
The interpolator object referenced by the specified id |
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 : Context for loading resources |
fromLeft |
boolean : is the object to be animated coming from the left |
makeInChildBottomAnimation
public static Animation makeInChildBottomAnimation (Context c)
Make an animation for objects becoming visible. Uses a slide up and fade
effect.
Parameters |
c |
Context : Context for loading resources |
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 : Context for loading resources |
toRight |
boolean : is the object to be animated exiting to the right |