com.android.ide.common.rendering.api
Interface IAnimationListener


public interface IAnimationListener


Method Summary
 void done(Result result)
          Called when the animation is done playing.
 boolean isCanceled()
          Return true to cancel the animation.
 void onNewFrame(RenderSession scene)
          Called when a new animation frame is available for display.
 

Method Detail

onNewFrame

void onNewFrame(RenderSession scene)
Called when a new animation frame is available for display.

The RenderSession object is provided as a convenience. It should be queried for the image through RenderSession.getImage().

If no IImageFactory is used, then each new animation frame will be rendered in its own new BufferedImage object. However if an image factory is used, and it always re-use the same object, then the image is only guaranteed to be valid during this method call. As soon as this method return the image content will be overridden with new drawing.


done

void done(Result result)
Called when the animation is done playing.


isCanceled

boolean isCanceled()
Return true to cancel the animation.