public class AnimationListenerRegistry
extends java.lang.Object
AnimationListener
Constructor and Description |
---|
AnimationListenerRegistry() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isAnimationRunning()
Gets whether or not an animation is running.
|
static void |
notifyOnStart(java.lang.String id)
Notifies all the animation listeners that an animation is started.
|
static void |
notifyOnStop(java.lang.String id)
Notifies all the animation listeners that an animation is stopped.
|
static void |
register(AnimationListener animationListener)
Registers an animation listener.
|
static void |
unregister(AnimationListener animationListener)
Unregisters an animation listener.
|
public static void register(AnimationListener animationListener)
An animation listener can be registered twice, it will be notified twice.
animationListener
- the animation listener to add.java.lang.NullPointerException
- if the given listener is null
.public static void unregister(@Nullable AnimationListener animationListener)
If the listener is null
or not registered, nothing changes.
animationListener
- the animation listener to remove.public static void notifyOnStart(java.lang.String id)
id
- the id of the animation.AnimationListener.onStartAnimation()
public static void notifyOnStop(java.lang.String id)
id
- the id of the animation.AnimationListener.onStopAnimation()
public static boolean isAnimationRunning()
true
if an animation is running, false
otherwise.