I am making a simple application and I find that I am not able to change the background to a layout by indicating the name of the image in question by String.
The code I have is this:
fondo.setBackgroundResource(R.mipmap.ff);
Where "ff" is the name of the image that I already have saved as a resource ("ff.jpg"). This is how it works perfectly. What I would like is for that "ff" to be supplied by means of a String. Something like this:
miString="ff.jpg";
fondoJuego.setBackgroundResource(R.mipmap.miString);