title: How to assign Image Resource to ImageView with String in Android
body: <p>I am trying to create a routine that will assign a card image to an ImageView without using something like this: R.drawable.card_10clover. I would prefer to use a string, but the way I'm doing it doesn't work.</p>
  
  <pre><code>String imgRes = "R.drawable.card_";
  int num = 10;
  imgRes += "10";
  String suit = "clover";
  imgRes += "suit;
  ImageView card = (ImageView) findViewById(R.id.imgcard);
  card.setImageResource(imgRes);
  </code></pre>
  
  <p>Unfortunately setImageResource only takes an int.  Please help.</p>
  
  <p>Thank you,
  Jack Blue</p>