DrawableResolver

An interface for classes that resolve a Drawable based on a Context. This is useful to separate business logic from presentation, where a service or ViewModel can refer to a resource or other types of data that depend on the Locale or display without needing a Context to resolve its value.

Inheritors

Functions

Link copied to clipboard
abstract fun get(context: Context): Drawable

Resolves a Drawable based on the given Context. The resulting value may differ per Context. 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)