DelayedDrawableResolver

data class DelayedDrawableResolver(afterDelayDrawableResolver: DrawableResolver, currentUri: Uri, cachedDrawables: LinkedHashMap<Uri, Drawable>? = null, viewModelCoroutineScope: CoroutineScope? = null) : DrawableResolver

A Drawable that will immediately return the cached Drawable value for the requested Uri, if it exits. Then, after a delay of DELAY_MS it will return the afterDelayDrawableResolver. This is useful for facilitating smooth transitions between images.

Constructors

Link copied to clipboard
constructor(afterDelayDrawableResolver: DrawableResolver, currentUri: Uri, cachedDrawables: LinkedHashMap<Uri, Drawable>? = null, viewModelCoroutineScope: CoroutineScope? = null)

Functions

Link copied to clipboard
open override fun get(context: Context): Drawable
Link copied to clipboard
fun startDelay(beforeDelayRemoteImageUri: Uri)

Starts a delay for switching from initial cached Drawable to afterDelayDrawableResolver.

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)