net.rim.device.api.animation
Interface AnimationListener


public interface AnimationListener

Defines an interface that allows you to register a listener on an AbstractAnimation. Listeners receive callbacks when the animation begins or ends.

Registering an AnimationListener

The following sample shows how to register an AnimationListener on an Animation or AnimationGroup.
 
 // Create the listener
 AnimationListener listener = new MyAnimationListener();
 // Create the animation
 Animation myAnimation = animator.addAnimationFromBy(myAnimatable, MyAnimatable.PROPERTY_2, 10.0f, 50.0f, Animation.EASINGCURVE_CIRCULAR_IN, 1000L);
 // Set the listener on the animation
 myAnimation.addListener(listener);
 

You can configure animations to begin or end in response to other animations beginning or ending. Please refer to AnimationTrigger to learn how.

See Also:
AbstractAnimation
Since:
BlackBerry API 6.0.0

Method Summary
 void animationBegin(AbstractAnimation animation)
           Method that is called when an animation associated with the listener begins.
 void animationEnd(AbstractAnimation animation)
           Method that is called when an animation associated with the listener ends.
 



Method Detail

animationBegin

void animationBegin(AbstractAnimation animation)

Method that is called when an animation associated with the listener begins.

Parameters:
animation - The animation notifying the listener that it has begun.
Since:
BlackBerry API 6.0.0

animationEnd

void animationEnd(AbstractAnimation animation)

Method that is called when an animation associated with the listener ends.

Parameters:
animation - The animation notifying the listener that it has ended.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.