Builder

class Builder

Constructors

Link copied to clipboard
constructor(context: PlatformContext)
constructor(request: ImageRequest, context: PlatformContext = request.context)

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Enables adding a file's last modified timestamp to the memory cache key when loading an image from a file.

Link copied to clipboard

Create a new ImageRequest.

Link copied to clipboard

Enable a crossfade animation when a request completes successfully.

Enable a crossfade animation when a request completes successfully.

Link copied to clipboard

Set the data to load.

Link copied to clipboard

Use factory to handle decoding any image data.

Link copied to clipboard

Set the defaults for any unset request values.

Link copied to clipboard

Set the disk cache key for this request.

Link copied to clipboard

Enable/disable reading/writing from/to the disk cache.

Link copied to clipboard

Set the error image to use if the request fails.

Link copied to clipboard

Set the fallback image to use if data is null.

Link copied to clipboard

Use factory to handle fetching any image data.

Link copied to clipboard

The FileSystem that will be used to perform any disk read/write operations.

Link copied to clipboard

Set the Listener.

inline fun listener(crossinline onStart: (request: ImageRequest) -> Unit = {}, crossinline onCancel: (request: ImageRequest) -> Unit = {}, crossinline onError: (request: ImageRequest, result: ErrorResult) -> Unit = { _, _ -> }, crossinline onSuccess: (request: ImageRequest, result: SuccessResult) -> Unit = { _, _ -> }): ImageRequest.Builder

Convenience function to create and set the Listener.

Link copied to clipboard

Set the maximum width and height for a bitmap.

Link copied to clipboard

Set the memory cache key for this request.

Link copied to clipboard

Set extra values to be added to this image request's memory cache key.

Link copied to clipboard

Set extra values to be added to this image request's memory cache key.

Link copied to clipboard

Enable/disable reading/writing from/to the memory cache.

Link copied to clipboard

Enable/disable reading from the network.

Link copied to clipboard

Set the placeholder image to use when the request starts.

Link copied to clipboard

Set the memory cache key whose value will be used as the placeholder image.

Set the memory cache key whose value will be used as the placeholder drawable.

Link copied to clipboard

Set the precision for the size of the loaded image.

Link copied to clipboard

Set the scaling algorithm that will be used to fit/fill the image into the size provided by sizeResolver.

Link copied to clipboard
fun size(width: Int, height: Int): ImageRequest.Builder

Set the requested width/height.

Set the SizeResolver to resolve the requested width/height.

Link copied to clipboard

Set the Target.

inline fun target(crossinline onStart: (placeholder: Image?) -> Unit = {}, crossinline onError: (error: Image?) -> Unit = {}, crossinline onSuccess: (result: Image) -> Unit = {}): ImageRequest.Builder

Convenience function to create and set the Target.