public class

DefaultDrawableFactory

extends Object
implements DrawableFactory
java.lang.Object
   ↳ com.facebook.drawee.backends.pipeline.DefaultDrawableFactory

Summary

Public Constructors
DefaultDrawableFactory(Resources resources, DrawableFactory animatedDrawableFactory)
Public Methods
Drawable createDrawable(CloseableImage closeableImage)
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.imagepipeline.drawable.DrawableFactory

Public Constructors

public DefaultDrawableFactory (Resources resources, DrawableFactory animatedDrawableFactory)

Public Methods

public Drawable createDrawable (CloseableImage closeableImage)

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

Parameters
closeableImage 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