Skip to content

//deferred-resources/com.backbase.deferredresources/DeferredColor

DeferredColor

[androidJvm] interface DeferredColor

A wrapper for resolving a ColorInt color on demand.

Types

Name Summary
Attribute [androidJvm]
Content
class Attribute(@AttrRes()resId: Int) : ParcelableDeferredColor
More info
A wrapper for a AttrRes reference to a color.


Constant [androidJvm]
Content
class Constant(@ColorInt()value: Int) : ParcelableDeferredColor
More info
A wrapper for a constant color value.


Resource [androidJvm]
Content
class Resource(@ColorRes()resId: Int) : ParcelableDeferredColor
More info
A wrapper for a ColorRes.


Functions

Name Summary
resolve [androidJvm]
Content
@ColorInt()

abstract fun resolve(context: Context): Int
More info
Resolve the ColorInt color.


resolveToStateList [androidJvm]
Content
abstract fun resolveToStateList(context: Context): ColorStateList
More info
Resolve the color to a ColorStateList.


Inheritors

Name
ParcelableDeferredColor

Extensions

Name Summary
asDrawable [androidJvm]
Content
fun DeferredColor.asDrawable(): DeferredColorDrawable
More info
Convert a DeferredColor to a DeferredDrawable by wrapping the resolved color in a ColorDrawable.


withAlpha [androidJvm]
Content
fun DeferredColor.withAlpha(@IntRange(from = 0.toLong(), to = 255.toLong())alpha: Int): DeferredColorWithAlpha
fun DeferredColor.withAlpha(@FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble())alpha: Float): DeferredColorWithAlpha
More info
Create a DeferredColor that resolves with the given alpha, regardless of the base color's original alpha.