RemoteDrawable

open class RemoteDrawable(context: Context, uri: Uri, placeholder: Drawable?, targetView: ImageView?) : LiveDataDrawable

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

NOTE: By default, the drawable will be downloaded as its original size. When the uri represents a vector drawable, its original/ intrinsic size could be smaller than the view to be attached. This results in a blurry or pixelated appearance in the UI. In this case, targetView can be assigned as an indicator to specify the dimensions of the target view for this drawable.

Parameters

context

The context used for downloading the drawable from the URI.

uri

The URI to download the drawable from.

placeholder

The drawable to show before the drawable from the URI has been downloaded.

targetView

The target view for the drawable. When a target view is given, the remote drawable will be downloaded as large as the dimension of the target view. When this is null, the remote drawable will be downloaded as its original size.

Constructors

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

Inherited properties

Link copied to clipboard
val liveData: LiveData<Drawable>

Inherited functions

Link copied to clipboard
open override fun applyTheme(p0: Resources.Theme)
Link copied to clipboard
open override fun canApplyTheme(): Boolean
Link copied to clipboard
open fun clearColorFilter()
Link copied to clipboard
fun copyBounds(): Rect
fun copyBounds(p0: Rect)
Link copied to clipboard
open override fun draw(p0: Canvas)
Link copied to clipboard
open override fun getAlpha(): Int
Link copied to clipboard
fun getBounds(): Rect
Link copied to clipboard
open fun getCallback(): Drawable.Callback?
Link copied to clipboard
open override fun getChangingConfigurations(): Int
Link copied to clipboard
open override fun getColorFilter(): ColorFilter?
Link copied to clipboard
open override fun getConstantState(): Drawable.ConstantState?
Link copied to clipboard
open fun getCurrent(): Drawable
Link copied to clipboard
open fun getDirtyBounds(): Rect
Link copied to clipboard
open fun getDrawable(): Drawable?
Link copied to clipboard
open override fun getHotspotBounds(p0: Rect)
Link copied to clipboard
open override fun getIntrinsicHeight(): Int
Link copied to clipboard
open override fun getIntrinsicWidth(): Int
Link copied to clipboard
open fun getLayoutDirection(): Int
Link copied to clipboard
fun getLevel(): Int
Link copied to clipboard
open fun getMinimumHeight(): Int
Link copied to clipboard
open fun getMinimumWidth(): Int
Link copied to clipboard
open override fun getOpacity(): Int
Link copied to clipboard
open override fun getOpticalInsets(): Insets
Link copied to clipboard
open override fun getOutline(p0: Outline)
Link copied to clipboard
open override fun getPadding(p0: Rect): Boolean
Link copied to clipboard
open fun getState(): IntArray
Link copied to clipboard
open fun getTransparentRegion(): Region?
Link copied to clipboard
open override fun hasFocusStateSpecified(): Boolean
Link copied to clipboard
open fun inflate(p0: Resources, p1: XmlPullParser, p2: AttributeSet)
open override fun inflate(p0: Resources, p1: XmlPullParser, p2: AttributeSet, p3: Resources.Theme?)
Link copied to clipboard
open override fun invalidateDrawable(p0: Drawable)
Link copied to clipboard
open fun invalidateSelf()
Link copied to clipboard
open fun isAutoMirrored(): Boolean
Link copied to clipboard
open fun isFilterBitmap(): Boolean
Link copied to clipboard
open fun isProjected(): Boolean
Link copied to clipboard
open override fun isStateful(): Boolean
Link copied to clipboard
fun isVisible(): Boolean
Link copied to clipboard
open override fun jumpToCurrentState()
Link copied to clipboard
open override fun mutate(): Drawable
Link copied to clipboard
open override fun onBoundsChange(p0: Rect)
Link copied to clipboard
open override fun onLayoutDirectionChanged(p0: Int): Boolean
Link copied to clipboard
open override fun onLevelChange(p0: Int): Boolean
Link copied to clipboard
open override fun onStateChange(p0: IntArray): Boolean
Link copied to clipboard
open override fun scheduleDrawable(p0: Drawable, p1: Runnable, p2: Long)
Link copied to clipboard
open fun scheduleSelf(p0: Runnable, p1: Long)
Link copied to clipboard
open override fun setAlpha(p0: Int)
Link copied to clipboard
open fun setAutoMirrored(p0: Boolean)
Link copied to clipboard
open fun setBounds(p0: Rect)
open fun setBounds(p0: Int, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
fun setCallback(p0: Drawable.Callback?)
Link copied to clipboard
open fun setChangingConfigurations(p0: Int)
Link copied to clipboard
open override fun setColorFilter(p0: ColorFilter?)
open fun setColorFilter(p0: Int, p1: PorterDuff.Mode)
Link copied to clipboard
open fun setDither(p0: Boolean)
Link copied to clipboard
open fun setDrawable(p0: Drawable?)
Link copied to clipboard
open fun setFilterBitmap(p0: Boolean)
Link copied to clipboard
open override fun setHotspot(p0: Float, p1: Float)
Link copied to clipboard
open override fun setHotspotBounds(p0: Int, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
fun setLayoutDirection(p0: Int): Boolean
Link copied to clipboard
fun setLevel(p0: Int): Boolean
Link copied to clipboard
open fun setState(p0: IntArray): Boolean
Link copied to clipboard
open fun setTint(p0: Int)
Link copied to clipboard
open override fun setTintBlendMode(p0: BlendMode)
Link copied to clipboard
open override fun setTintList(tint: ColorStateList?)
Link copied to clipboard
open fun setTintMode(p0: PorterDuff.Mode?)
Link copied to clipboard
open override fun setVisible(visible: Boolean, restart: Boolean): Boolean
Link copied to clipboard
open override fun unscheduleDrawable(p0: Drawable, p1: Runnable)
Link copied to clipboard
open fun unscheduleSelf(p0: Runnable)