ColorResolver

interface ColorResolver : Parcelable

An interface for classes that resolve a color Int 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 theme or display without needing a Context to resolve its value.

Functions

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

Resolves a color Int based on the given context. The resulting value may differ per Context. E.g. due to differing themes.

Inherited functions

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

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard