AvatarBitmapFactory

open class AvatarBitmapFactory(context: Context)

A Bitmap factory to create avatar bitmaps.

Constructors

Link copied to clipboard
fun AvatarBitmapFactory(context: Context)

Functions

Link copied to clipboard
open fun avatarBitmapKey(avatar: Avatar): String?

Returns cache key for caching the avatar Bitmap image on memory.

Link copied to clipboard
open suspend fun createAvatarBitmaps(avatar: Avatar, @Px avatarSize: Int): Bitmap?

Creates a combined avatar Bitmap with the data model avatar and the specified avatarSize to represent the avatar image, in a suspending operation.

Link copied to clipboard
open suspend fun loadAvatarBitmap(data: Any?, avatar: Avatar, @Px avatarSize: Int): Bitmap?

Loads a Bitmap with the image request data to represent the avatar in a suspending operation.

Link copied to clipboard
open fun loadAvatarBitmapBlocking(data: Any?, avatar: Avatar, @Px avatarSize: Int): Bitmap?

Creates a Bitmap to represent an avatar image.

Link copied to clipboard
open suspend fun loadAvatarPlaceholderBitmap(data: Any?, avatar: Avatar, @Px avatarSize: Int): Bitmap?

Loads a Bitmap with the avatar to represent the placeholder of the avatar in a suspending operation. This method will be executed if the previous image request failed.

Link copied to clipboard
open fun loadAvatarPlaceholderBitmapBlocking(data: Any?, avatar: Avatar, @Px avatarSize: Int): Bitmap?

Loads a Bitmap with the avatar to represent the placeholder of the avatar in a suspending operation. This method will be executed if the previous image request failed.