Skip to content

//deferred-resources/com.backbase.deferredresources/DeferredDrawable/Attribute

Attribute

[androidJvm] class Attribute@JvmOverloads()constructor(@AttrRes()resId: Int, mutate: Boolean, transformations: Drawable.(Context) -> Unit) : DeferredDrawable

A wrapper for a Drawable. Optionally mutates each resolved Drawable. Optionally provide transformations (such as Drawable.setTint) to apply each time the Drawable is resolved.

If transformations are supplied, mutate should be true.

Constructors

Attribute [androidJvm] fun Attribute(@AttrRes()resId: Int, transformations: Drawable.(Context) -> Unit)Convenience constructor that sets mutate to true when transformations are supplied.
Attribute [androidJvm] @JvmOverloads()

fun Attribute(@AttrRes()resId: Int, mutate: Boolean = true, transformations: Drawable.(Context) -> Unit = {})

Functions

Name Summary
resolve [androidJvm]
Content
open override fun resolve(context: Context): Drawable?
More info
Resolve resId to a Drawable with the given context.