Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inline fun View.extractAttributes(@StyleableRes res: IntArray,
- attributeSet: AttributeSet,
- block: TypedArray.() -> Unit) {
- context?.extractAttributes(res, attributeSet, block)
- }
- inline fun Context.extractAttributes(@StyleableRes res: IntArray,
- attributeSet: AttributeSet,
- block: TypedArray.() -> Unit) {
- obtainStyledAttributes(attributeSet, res).useAndClose {
- block()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement