Try this,
int id = getResources().getIdentifier("yourpackagename:drawable/" + StringGenerated, null, null);
This will return the id of the drawable you want to access...
then you can set the image in the imageview by doing the following
imageview.setImageResource(id);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…