I want to use a variable instead of R.drawable.myimage because I have a database with the image\'s names. I get the name from the database and I want to use the drawable resourc
You can use this code to get the identifier...
Resources res = this.getResources(); int resID = res.getIdentifier(imagename, "drawable", this.getPackageName());