//Sample code
Resources resClick = getResources();
Class res = R.drawable.class;
Field field = res.getField("image1");
int imgID = field.getInt(null);
//-----------------------------------------
Another method
----getResources().getResourceEntryName("image1")
0 comments: