Get Drawable from vector resource irrespective of, whether its vector or not:
AppCompatResources.getDrawable(context, R.drawable.icon);
Note:
ContextCompat.getDrawable(context, R.drawable.icon);
will produce android.content.res.Resources$NotFoundException
for vector resource.