Package coil

Types

Coil
Link copied to clipboard
object Coil

A class that holds the singleton ImageLoader instance.

ImageLoaderFactory
Link copied to clipboard
fun interface ImageLoaderFactory

A factory that creates new ImageLoader instances.

Functions

clear
Link copied to clipboard
fun ImageView.clear()

Cancel any in progress requests and clear all resources associated with this ImageView.

load
Link copied to clipboard
inline fun ImageView.load(bitmap: Bitmap?, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable
inline fun ImageView.load(drawable: Drawable?, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable
inline fun ImageView.load(uri: Uri?, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable
inline fun ImageView.load(file: File?, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable
inline fun ImageView.load(@DrawableRes drawableResId: Int, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable
inline fun ImageView.load(uri: String?, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable
inline fun ImageView.load(url: HttpUrl?, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable
loadAny
Link copied to clipboard
inline fun ImageView.loadAny(data: Any?, imageLoader: ImageLoader = context.imageLoader, builder: ImageRequest.Builder.() -> Unit = {}): Disposable

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

Properties

imageLoader
Link copied to clipboard
@get:JvmName(name = "imageLoader")
val Context.imageLoader: ImageLoader

Get the singleton ImageLoader. This is an alias for Coil.imageLoader.

metadata
Link copied to clipboard
@get:JvmName(name = "metadata")
val ImageView.metadata: ImageResult.Metadata?

Get the metadata of the successful request attached to this view.