getDrawableFromRes

open fun getDrawableFromRes(@NonNull context: Context, @DrawableRes drawableRes: Int): Drawable

Get a drawable from a resource.

Return

The drawable created from the resource

Parameters

context
drawableRes

Drawable resource


open fun getDrawableFromRes(@NonNull context: Context, @DrawableRes drawableRes: Int, @Nullable @ColorInt tintColor: Integer): Drawable

Get a tinted drawable from a resource.

Return

The drawable created from the resource

Parameters

context
drawableRes

Drawable resource

tintColor

Tint color