|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AnimatorListener
Defines an interface for a listener that can be registered with an Animator
to receive callbacks when the Animator begins processing and when it becomes idle.
The methods only get called when the Animator moves between
the processing and idling state once per state change.
This helps when you write code to handle calling the animator on your own thread so that you can be notified when
your thread can wait in the background and when it must wake up so that the Animator
update() methods can resume being called at some user manageable interval.
This interface also has a callback method called on every animator.update() in which the Animator is started and that there are active animations. This is useful when a target frame rate is specified and the user wants a call each active frame of updates so that the user may invalidate() the area of the screen in which the animator may be effecting.
Animator:
// Create the Animator Animator animator = new Animator(25); // Create the AnimatorListener MyAnimatorListener animatorListener = new MyAnimatorListener(); // Set the AnimationListener on the Animator animator.setAnimatorListener(animatorListener);
Animator| Method Summary | ||
|---|---|---|
void |
animatorProcessing(boolean processing)
Callback method called when the Animator transitions from the idle state to the processing state. |
|
void |
animatorUpdate()
Callback method called when the Animator is playing and handling updates on at least 1 or more active animations. |
|
| Method Detail |
|---|
void animatorProcessing(boolean processing)
Callback method called when the Animator transitions from the idle state to the processing state.
void animatorUpdate()
Animator is playing and handling updates on at least 1 or more active animations.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal