public class

CloseableAnimatedBitmap

extends CloseableBitmap
java.lang.Object
   ↳ com.facebook.imagepipeline.image.CloseableImage
     ↳ com.facebook.imagepipeline.image.CloseableBitmap
       ↳ com.facebook.imagepipeline.image.CloseableAnimatedBitmap

Class Overview

CloseableImage that contains array of Bitmaps and frame durations.

Summary

Public Constructors
CloseableAnimatedBitmap(List<CloseableReference<Bitmap>> bitmapReferences, List<Integer> durations)
CloseableAnimatedBitmap(List<Bitmap> bitmaps, List<Integer> durations, ResourceReleaser<Bitmap> resourceReleaser)
Creates a new instance of a CloseableStaticBitmap.
Public Methods
void close()
Releases the bitmaps to the pool.
List<Bitmap> getBitmaps()
Gets the bitmap frames.
List<Integer> getDurations()
Gets the frame durations.
int getHeight()
int getSizeInBytes()
Bitmap getUnderlyingBitmap()
Gets the first frame.
int getWidth()
synchronized boolean isClosed()
Returns whether this instance is closed.
[Expand]
Inherited Methods
From class com.facebook.imagepipeline.image.CloseableBitmap
From class com.facebook.imagepipeline.image.CloseableImage
From class java.lang.Object
From interface com.facebook.imagepipeline.image.ImageInfo
From interface java.io.Closeable
From interface java.lang.AutoCloseable

Public Constructors

public CloseableAnimatedBitmap (List<CloseableReference<Bitmap>> bitmapReferences, List<Integer> durations)

public CloseableAnimatedBitmap (List<Bitmap> bitmaps, List<Integer> durations, ResourceReleaser<Bitmap> resourceReleaser)

Creates a new instance of a CloseableStaticBitmap.

Parameters
bitmaps the bitmap frames. This list must be immutable.
durations the frame durations, This list must be immutable.
resourceReleaser ResourceReleaser to release the bitmaps to

Public Methods

public void close ()

Releases the bitmaps to the pool.

public List<Bitmap> getBitmaps ()

Gets the bitmap frames.

Returns
  • bitmap frames

public List<Integer> getDurations ()

Gets the frame durations.

Returns
  • frame durations

public int getHeight ()

Returns
  • height of the image

public int getSizeInBytes ()

Returns
  • size in bytes all bitmaps in sum

public Bitmap getUnderlyingBitmap ()

Gets the first frame.

Returns
  • the first frame

public int getWidth ()

Returns
  • width of the image

public synchronized boolean isClosed ()

Returns whether this instance is closed.