getDrawable

Gets the drawable resource.


public final static Drawable getDrawable(Context context, @DrawableRes() Integer resourceId)

Obtains a drawable from a context and a DrawableRes id.

Parameters

context

The current activity or view context.

resourceId

The drawable resource id.

Throws

if doesn't exist a drawable for the given resourceId.