Using a String to change a Bitmap
<p>I have the following problem:</p>

<pre><code>    String explosion_type = this.prefs.getString("explosion_type", "ring_explosion");

    BitmapFactory.Options optionsExplosion = new BitmapFactory.Options();
    optionsExplosion.inPurgeable = true;
    this._explosionSprite = BitmapFactory.decodeResource(_context.getResources(), 
com.forwardapps.liveitems.R.drawable.explosion, optionsExplosion);
</code></pre>

<p>I'm trying to use a String in place of the resource name, that way I can hotswap resources in the preference menu. This method causes the app to crash.</p>

<p>What is the proper way of implementing a situation like this? (Without making it too complicated or using if statements)</p>
