Package com.tomtom.tools.android.api.graphics.drawable
Types
Link copied to clipboard
open class LiveDataDrawable(liveData: LiveData<Drawable>, initialDrawable: Drawable?) : DrawableWrapper
Content copied to clipboard
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?, targetView: ImageView?) : LiveDataDrawable
Content copied to clipboard
A LiveDataDrawable that resolves its LiveData contents from the given URI.
Link copied to clipboard
data class RemoteDrawableResolver(uri: Uri, placeholder: DrawableResolver?) : DrawableResolver
Content copied to clipboard
A DrawableResolver that resolves a drawable from the given uri.
Link copied to clipboard
class TextDrawable(context: Context, text: String, @ColorInt textColor: Int) : Drawable
Content copied to clipboard
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
data class TextDrawableResolver(text: StringResolver, textColor: ColorResolver) : DrawableResolver
Content copied to clipboard
A DrawableResolver that creates a Drawable with a text retrieved from a StringResolver.
Functions
Link copied to clipboard
fun ImageView.setRemoteDrawable(uri: Uri?, placeholder: DrawableResolver?)
Content copied to clipboard
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.