I have code like tthis:
String s = \"replace__menu__\" + data.imageid + \".png\";
int RID = this.getApplicationContext().getResources().getIdentifier(s, \"dr
".png" is not part of a ressource name
"drawable-hdpi" I would try just 'drawable' instead
Try this
String s = "replace__menu__" + data.imageid; // image name is needed without extention
int RID = this.getApplicationContext().getResources().getIdentifier(s, "drawable", getPackageName());