Dynamically get drawables by ID
<p>I want to take a <code>byte</code> and append it to a resource ID to be able to get the image that corresponds to that numbered deck in the game.  It was easy to with paths on other devices, but with the Resource ID's I am unsure how I could go about do this.</p>

<p>Here's what I have now:</p>

<pre><code>switch(GameSettings.gameDeck)
    {
    case 1:
        deckImage.setBackgroundResource(R.drawable.deck1);
        break;
    case 2:
        deckImage.setBackgroundResource(R.drawable.deck2);
        break;
    case 3:
        deckImage.setBackgroundResource(R.drawable.deck3);
        break;
    case 4:
        deckImage.setBackgroundResource(R.drawable.deck4);
        break;
    }
</code></pre>

<p>In my Blackberry version of this, I simply had:</p>

<pre><code>deckImage.setBitmap(Bitmap.getBitmapResource("/path/deck" + GameSettings.gameDeck + ".png"));
</code></pre>

<p>Is there a way to accomplish something similar using Resource IDs on Android?</p>
