drawableAttr

inline fun ComponentContext.drawableAttr(@AttrRes id: Int, @DrawableRes defResId: Int = 0): Drawable

Retrieve a android.graphics.drawable.Drawable, corresponding to an attribute resource ID, as a Drawable instance. If given attribute ID can not be found, default Drawable resource ID defResId is used.