use a TypedArray
to define the images in an array resource. then you can load the resource and get the resources as offsets. It will be significantly faster than using getIdentifier(). Note that I added a 0.png drawable, so the array indices would match your numeric values.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="icons">
<item>@drawable/0</item>
<item>@drawable/1</item>
<item>@drawable/2</item>
<item>@drawable/3</item>
</array>
</resources>
Then in your code:
Resources res = getResources();
TypedArray sprites = res.obtainTypedArray(R.array.icons);
Drawable drawable = sprites.getDrawable(1);
Here's the resources link which gives the background: http://developer.android.com/guide/topics/resources/more-resources.html