I have 52 images of a deck of cards in my Drawable folder, with .png format.
I want to modify my android:src attribute of an ImageView, but using a var which saves the name of my image name. For example.
String nameOfCard="two_of_diamonds"; // and as I said I have an Image called two_of_diamonds in my Drawable folder
I tried several ways but I didn´t find the correct one. If I use: imageview.setImageResource(int) I need an int not a String reference.
Any idea? Thanks!