Builder

class Builder

Constructors

Link copied to clipboard
constructor(context: PlatformContext)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sets the strategy for handling the EXIF orientation flag for images decoded by BitmapFactoryDecoder.

Link copied to clipboard

Sets the maximum number of parallel BitmapFactory or ImageDecoder decode operations at once.

Link copied to clipboard

Create a new ImageLoader instance.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Set the DiskCache.

fun diskCache(initializer: () -> DiskCache?): ImageLoader.Builder

Set a lazy callback to create the DiskCache.

Link copied to clipboard

Set the default disk cache policy.

Link copied to clipboard

Set the default error image to use when a request fails.

Link copied to clipboard

Set a single EventListener that will receive all callbacks for requests launched by this image loader.

Link copied to clipboard
Link copied to clipboard

Set the default fallback image to use if ImageRequest.data is null.

Link copied to clipboard
Link copied to clipboard

Set the default FileSystem for any image requests.

Link copied to clipboard

Enables using ImageDecoder as this image loader's main Decoder on API 29 and above. If false, BitmapFactory is used on all API levels.

Link copied to clipboard
Link copied to clipboard

Set the Logger to write logs to.

Link copied to clipboard
Link copied to clipboard

Set the MemoryCache.

fun memoryCache(initializer: () -> MemoryCache?): ImageLoader.Builder

Set a lazy callback to create the MemoryCache.

Reduces the memory cache's MemoryCache.maxSize to a percent of MemoryCache.initialMaxSize while the app is in the background (i.e. while its process lifecycle state is not at least Lifecycle.State.STARTED).

Link copied to clipboard

Set the default memory cache policy.

Link copied to clipboard

Set the default network cache policy.

Link copied to clipboard

Set the default placeholder image to use when a request starts.

Link copied to clipboard

Set the default precision for a request. Precision controls whether the size of the loaded image must match the request's size exactly or not.

Link copied to clipboard

Enables adding all components (fetchers and decoders) that are supported by the service locator to this ImageLoader's ComponentRegistry. All of Coil's first party decoders and fetchers are supported.