Package io.getstream.avatarview.coil

Types

Link copied to clipboard
data class Avatar(data: List<Any?>, maxSectionSize: Int, avatarBorderWidth: Int, errorPlaceholder: Drawable?, onSuccess: (request: ImageRequest, metadata: ImageResult.Metadata) -> Unit, onError: (request: ImageRequest, throwable: Throwable) -> Unit)

A data transfer model for transferring image data to AvatarFetcher. This model will be fetched by AvatarFetcher when we request image loading by using this type to Coil.

Link copied to clipboard
open class AvatarBitmapFactory(context: Context)

A Bitmap factory to create avatar bitmaps.

Link copied to clipboard
object AvatarCoil

AvatarCoil provides a ImageLoader, AvatarBitmapFactory, and ImageHeadersProvider that can be fully customized for loading avatar image:

Link copied to clipboard
class AvatarImageLoaderFactory(context: Context, builder: ImageLoader.Builder.() -> Unit) : ImageLoaderFactory

An ImageLoader factory to provide an instance of the ImageLoader.

Link copied to clipboard
object AvatarImageLoaderInternal

An internal image loader to request image data with Coil.

Link copied to clipboard
interface ImageHeadersProvider

Provides HTTP headers for image loading requests.

Functions

Link copied to clipboard
inline fun AvatarView.loadImage(data: Any?, crossinline onStart: () -> Unit = {}, crossinline onComplete: () -> Unit = {}, noinline onSuccess: (request: ImageRequest, metadata: ImageResult.Metadata) -> Unit = { _, _ -> }, noinline onError: (request: ImageRequest, throwable: Throwable) -> Unit = { _, _ -> }, builder: ImageRequest.Builder.() -> Unit = {})

Loads an image request data to the AvatarView.

inline fun AvatarView.loadImage(vararg data: Any?, crossinline onStart: () -> Unit = {}, crossinline onComplete: () -> Unit = {}, noinline onSuccess: (request: ImageRequest, metadata: ImageResult.Metadata) -> Unit = { _, _ -> }, noinline onError: (request: ImageRequest, throwable: Throwable) -> Unit = { _, _ -> }, builder: ImageRequest.Builder.() -> Unit = {})

Loads a vararg of image request data to the AvatarView. Up to 4 images will be combined and loaded.

inline fun AvatarView.loadImage(data: List<Any?>, crossinline onStart: () -> Unit = {}, crossinline onComplete: () -> Unit = {}, noinline onSuccess: (request: ImageRequest, metadata: ImageResult.Metadata) -> Unit = { _, _ -> }, noinline onError: (request: ImageRequest, throwable: Throwable) -> Unit = { _, _ -> }, builder: ImageRequest.Builder.() -> Unit = {})

Loads a list of image request data to the AvatarView. Up to 4 images will be combined and loaded.