public class

ExperimentalAnimationFactory

extends Object
implements DrawableFactory
java.lang.Object
   ↳ com.facebook.fresco.animation.factory.ExperimentalAnimationFactory

Class Overview

Animation factory for AnimatedDrawable2. This basically mimics the backend creation of AnimatedDrawableFactoryImpl.

Summary

Public Constructors
ExperimentalAnimationFactory(AnimatedDrawableBackendProvider animatedDrawableBackendProvider, AnimatedDrawableCachingBackendImplProvider animatedDrawableCachingBackendProvider, ScheduledExecutorService scheduledExecutorServiceForUiThread, MonotonicClock monotonicClock)
Public Methods
AnimatedDrawable2 createDrawable(CloseableImage image)
Create a drawable for the given image.
boolean supportsImageType(CloseableImage image)
Returns true if the factory can create a Drawable for the given image.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.drawee.backends.pipeline.DrawableFactory

Public Constructors

public ExperimentalAnimationFactory (AnimatedDrawableBackendProvider animatedDrawableBackendProvider, AnimatedDrawableCachingBackendImplProvider animatedDrawableCachingBackendProvider, ScheduledExecutorService scheduledExecutorServiceForUiThread, MonotonicClock monotonicClock)

Public Methods

public AnimatedDrawable2 createDrawable (CloseableImage image)

Create a drawable for the given image. It is guaranteed that this method is only called if supportsImageType(CloseableImage) returned true.

Parameters
image the image to create the drawable for
Returns
  • the Drawable for the image or null if an error occurred

public boolean supportsImageType (CloseableImage image)

Returns true if the factory can create a Drawable for the given image.

Parameters
image the image to check
Returns
  • true if a Drawable can be created