public class

AnimatedDrawableSupport

extends AbstractAnimatedDrawable
implements AnimatableDrawableSupport
java.lang.Object
   ↳ android.graphics.drawable.Drawable
     ↳ com.facebook.imagepipeline.animated.base.AbstractAnimatedDrawable
       ↳ com.facebook.imagepipeline.animated.base.AnimatedDrawableSupport

Class Overview

A Drawable that renders a animated image. The details of the format are abstracted by the AnimatedDrawableBackend interface. The drawable can work either as an Animatable where the client calls start/stop to animate it or it can work as a level-based drawable where the client drives the animation by calling setLevel(int).

Summary

Public Constructors
AnimatedDrawableSupport(ScheduledExecutorService scheduledExecutorServiceForUiThread, AnimatedDrawableCachingBackend animatedDrawableBackend, AnimatedDrawableDiagnostics animatedDrawableDiagnostics, MonotonicClock monotonicClock)
Public Methods
ValueAnimator.AnimatorUpdateListener createAnimatorUpdateListener()
Creates an animator update listener that will animate the drawable directly.
ValueAnimator createValueAnimator()
An animator that will animate the drawable directly.
ValueAnimator createValueAnimator(int maxDurationMs)
An animator that will animate the drawable directly.
[Expand]
Inherited Methods
From class com.facebook.imagepipeline.animated.base.AbstractAnimatedDrawable
From class android.graphics.drawable.Drawable
From class java.lang.Object
From interface android.graphics.drawable.Animatable
From interface com.facebook.drawable.base.DrawableWithCaches
From interface com.facebook.imagepipeline.animated.base.AnimatableDrawableSupport

Public Constructors

public AnimatedDrawableSupport (ScheduledExecutorService scheduledExecutorServiceForUiThread, AnimatedDrawableCachingBackend animatedDrawableBackend, AnimatedDrawableDiagnostics animatedDrawableDiagnostics, MonotonicClock monotonicClock)

Public Methods

public ValueAnimator.AnimatorUpdateListener createAnimatorUpdateListener ()

Creates an animator update listener that will animate the drawable directly. This is useful when the drawable needs to be animated by an existing value animator.

Returns
  • a new update listener

public ValueAnimator createValueAnimator ()

An animator that will animate the drawable directly. The loop count and duration will be determined by metadata in the original image. Update listener is attached automatically.

Returns
  • a new animator

public ValueAnimator createValueAnimator (int maxDurationMs)

An animator that will animate the drawable directly. The loop count will be set based on the specified duration. Update listener is attached automatically.

Parameters
maxDurationMs maximum duration animate
Returns
  • a new animator