load

inline fun ImageView.load(data: Any?, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable

Load the image referenced by data and set it on this ImageView.

Example:

imageView.load("https://example.com/image.jpg") {
crossfade(true)
transformations(CircleCropTransformation())
}

Parameters

data

The data to load.

imageLoader

The ImageLoader that will be used to enqueue the ImageRequest. By default, the singleton ImageLoader will be used.

builder

An optional lambda to configure the ImageRequest.