public class

AnimatedDrawableOptionsBuilder

extends Object
java.lang.Object
   ↳ com.facebook.imagepipeline.animated.base.AnimatedDrawableOptionsBuilder

Class Overview

Builder for AnimatedDrawableOptions.

Summary

Public Constructors
AnimatedDrawableOptionsBuilder()
Public Methods
AnimatedDrawableOptions build()
Builds the immutable options instance.
boolean getAllowPrefetching()
Gets whether the drawable can use worker threads to optimistically prefetch frames.
boolean getEnableDebugging()
Gets whether to enable additional verbose debugging diagnostics.
boolean getForceKeepAllFramesInMemory()
Gets whether all the rendered frames should be held in memory disregarding other constraints.
int getMaximumBytes()
Gets the maximum bytes that the backend can use to cache image frames in memory.
AnimatedDrawableOptionsBuilder setAllowPrefetching(boolean allowPrefetching)
Sets whether the drawable can use worker threads to optimistically prefetch frames.
AnimatedDrawableOptionsBuilder setEnableDebugging(boolean enableDebugging)
Sets whether to enable additional verbose debugging diagnostics.
AnimatedDrawableOptionsBuilder setForceKeepAllFramesInMemory(boolean forceKeepAllFramesInMemory)
Sets whether all the rendered frames should be held in memory disregarding other constraints.
AnimatedDrawableOptionsBuilder setMaximumBytes(int maximumBytes)
Sets the maximum bytes that the backend can use to cache image frames in memory.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AnimatedDrawableOptionsBuilder ()

Public Methods

public AnimatedDrawableOptions build ()

Builds the immutable options instance.

Returns
  • the options instance

public boolean getAllowPrefetching ()

Gets whether the drawable can use worker threads to optimistically prefetch frames.

Returns
  • whether the backend can use worker threads to prefetch frames

public boolean getEnableDebugging ()

Gets whether to enable additional verbose debugging diagnostics.

Returns
  • whether to enable additional verbose debugging diagnostics

public boolean getForceKeepAllFramesInMemory ()

Gets whether all the rendered frames should be held in memory disregarding other constraints.

Returns
  • whether all the rendered frames should be held in memory

public int getMaximumBytes ()

Gets the maximum bytes that the backend can use to cache image frames in memory.

Returns
  • maximumBytes maximum bytes that the backend can use to cache image frames in memory or -1 to use the default

public AnimatedDrawableOptionsBuilder setAllowPrefetching (boolean allowPrefetching)

Sets whether the drawable can use worker threads to optimistically prefetch frames.

Parameters
allowPrefetching whether the backend can use worker threads to prefetch frames
Returns
  • this builder

public AnimatedDrawableOptionsBuilder setEnableDebugging (boolean enableDebugging)

Sets whether to enable additional verbose debugging diagnostics.

Parameters
enableDebugging whether to enable additional verbose debugging diagnostics
Returns
  • this builder

public AnimatedDrawableOptionsBuilder setForceKeepAllFramesInMemory (boolean forceKeepAllFramesInMemory)

Sets whether all the rendered frames should be held in memory disregarding other constraints.

Parameters
forceKeepAllFramesInMemory whether to force the frames to be held in memory
Returns
  • this builder

public AnimatedDrawableOptionsBuilder setMaximumBytes (int maximumBytes)

Sets the maximum bytes that the backend can use to cache image frames in memory.

Parameters
maximumBytes maximum bytes that the backend can use to cache image frames in memory or -1 to use the default
Returns
  • this builder