Package icyllis.modernui.graphics.drawable

# Interface Animatable2

All Superinterfaces:
  `Animatable`

All Known Implementing Classes:
  `AnimatedImageDrawable`

public interface Animatable2 extends Animatable
Abstract class that drawables supporting animations and callbacks should extend.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `Animatable2.AnimationCallback`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clearAnimationCallbacks()`
  Removes all existing animation callbacks.
  `void`
  `registerAnimationCallback(Animatable2.AnimationCallback callback)`
  Adds a callback to listen to the animation events.
  `boolean`
  `unregisterAnimationCallback(Animatable2.AnimationCallback callback)`
  Removes the specified animation callback.

  ### Methods inherited from interface icyllis.modernui.graphics.drawable.Animatable

  `isRunning, start, stop`

- ## Method Details

  - ### registerAnimationCallback

    void registerAnimationCallback(@NonNull Animatable2.AnimationCallback callback)
    Adds a callback to listen to the animation events.
    Parameters:
      `callback` - Callback to add.

  - ### unregisterAnimationCallback

    boolean unregisterAnimationCallback(@NonNull Animatable2.AnimationCallback callback)
    Removes the specified animation callback.
    Parameters:
      `callback` - Callback to remove.
    Returns:
      `false` if callback didn't exist in the call back list, or `true` if callback has been removed successfully.

  - ### clearAnimationCallbacks

    void clearAnimationCallbacks()
    Removes all existing animation callbacks.