title: Android getBackgroundResource from string
body: <p>Ok guys, let's say i have a <em>String k = "image1";</em> and there is a picture in my drawable folder with name image1.png for example. How i can change a button image getting the name of the image from that string? Let's say the button name is button1, then  <em>button1.setBackgroundResource(R.drawable.image1);</em> could work, but i want something like <em>button1.setBackgroundResource(R.drawable.k);</em> and k get the value "image1", so for example i can pick the image name from a database. Thanks</p>