title: Android, getting resource ID from string?
body: <p>I need to pass a resource ID to a method in one of my classes. It needs to use both the id that the reference points to and also it needs the string. How should I best achieve this?</p>
  
  <p>For example:</p>
  
  <pre><code>R.drawable.icon
  </code></pre>
  
  <p>I need to get the integer ID of this, but I also need access to the string "icon".</p>
  
  <p>It would be preferable if all I had to pass to the method is the "icon" string.</p>