RemoteDrawableResolver

data class RemoteDrawableResolver(uri: Uri, placeholder: DrawableResolver? = null, error: DrawableResolver? = null) : DrawableResolver

A DrawableResolver that resolves a drawable from the given uri.

NOTE: It is the client's responsibility to make sure the uri is secure and trusted.

Parameters

uri

The URI to download the drawable from.

placeholder

The drawable to show before drawable at uri has been downloaded.

error

The drawable to show if some error occurs.

Constructors

Link copied to clipboard
constructor(uri: Uri, placeholder: DrawableResolver? = null, error: DrawableResolver? = null)

Functions

Link copied to clipboard
open override fun get(context: Context): RemoteDrawable

Resolves a RemoteDrawable based on the given context. The drawable will be its original size. The resulting value may differ per context. E.g. due to differing device screen densities.

fun get(targetView: ImageView): RemoteDrawable

Resolves a RemoteDrawable based on the given targetView. The drawable will be the same size as the targetView. The resulting value may differ per View.getContext. E.g. due to differing device screen densities.

Inherited functions

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