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
I had the same problem as you and I did the following to solve it:
**IMAGEVIEW**.setImageResource(getActivity() .getResources() .getIdentifier("**IMG**", "drawable", getActivity() .getPackageName()));