Package-level declarations

Types

Link copied to clipboard
open class LiveDataDrawable(val liveData: LiveData<Drawable>, initialDrawable: Drawable? = null) : DrawableWrapper

A Drawable that shows the current Drawable value from a liveData instance.

Link copied to clipboard
open class RemoteDrawable(context: Context, uri: Uri, placeholder: Drawable? = null, error: Drawable? = null, targetView: ImageView? = null) : LiveDataDrawable

A LiveDataDrawable that resolves its LiveData contents from the given URI.

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

A DrawableResolver that resolves a drawable from the given uri.

Link copied to clipboard
class TextDrawable(context: Context, text: String, @ColorInt textColor: Int) : Drawable

A Drawable that draws the given text. The text will be placed in the center of the drawable's bounding rectangle.

Link copied to clipboard

A DrawableResolver that creates a Drawable with a text retrieved from a StringResolver.

Functions

Link copied to clipboard
suspend fun Drawable.blur(context: Context, @Px blurRadiusPx: Float, samplingMultiplier: Float = DEFAULT_SAMPLING_MULTIPLIER): Drawable

Creates a blurred version of a drawable.

Link copied to clipboard
fun ImageView.setRemoteDrawable(uri: Uri?, placeholder: Drawable?)

A convenience binding adapter for setting a RemoteDrawable as the drawable for an ImageView, allowing the uri to be shown in the ImageView. If uri is null or not yet loaded, the placeholder will be shown.

fun ImageView.setRemoteDrawable(uri: Uri?, placeholder: Drawable?, error: Drawable?)

A convenience binding adapter for setting a RemoteDrawable as the drawable for an ImageView, allowing the uri to be shown in the ImageView. If uri is null or not yet loaded, the placeholder will be shown even error is not null. If error is defined and the loading fails error will be shown. If uri, placeholder and error are not null and error happen during download first placeholder will be shown then after error occurs error will be shown.