I am generating a string from database dynamically which has the same name of image in drawable folder.
drawable
Now I want to set that value for ImageView
ImageView
From API 22 use:
Drawable myDrawable = ResourcesCompat.getDrawable(getResources(), R.drawable.dos_red, null);