This call will result in calls to the {@link TimingTarget#end(Animator)}method of all the registered timing targets of this animation.
The animation may take some period of time to actually stop, it waits for all calls to registered {@link TimingTarget}s to complete. Invoking {@link #await()} after this method will wait until the animation stops.This means that the code snippet " {@code a.stop(); a.start();}" could fail throwing an {@link IllegalStateException} at the call to {@link #start()}because the animation may not have stopped right away. This can be fixed by inserting a call to {@link #await()} or using the snippet "{@code a.stopAndAwait(); a.start();}" instead. @return {@code true} if the animation was running and was successfullystopped, {@code false} if the animation was not running or was inthe process of stopping and didn't need to be stopped. @see #await() @see #stopAndAwait() @see #cancel()
|
|