nullableAttribute

fun <R : Resource, T> R.nullableAttribute(name: String, defaultValue: T? = null): MapDelegate<R, T?>(source)

Delegate for nullable attributes. Let you specify the name of the attribute to delegate to.

Return

The delegate.

Parameters

name

The name of the attribute.

defaultValue

The default value of the attribute.

R

The type of the resource.

T

The type of the attribute.