library / org.akop.kotx.ext.app / android.content.Context / withStyledAttributes

withStyledAttributes

fun Context.withStyledAttributes(attrs: IntArray, set: AttributeSet? = null, defStyleAttr: Int = 0, defStyleRes: Int = 0, block: TypedArray.() -> Unit): Unit

Obtains TypedArray by calling Resources.Theme.obtainStyledAttributes with supplied parameters, then passing the array to the supplied block, before recycling it.