how to accesse 100+ drawable resorces via an array?

Problems with Canvas, OpenGL, etc...

how to accesse 100+ drawable resorces via an array?

Postby gfxcomplex » Sun Jul 25, 2010 4:48 pm

Hello,

I have a 3d rendering that I want to show rotating as a sequence of bitmaps. The resources needed could get up into the +100s.

How would I access the assets in the form of an array so that I dont have to list out ever image as a resoure


Example.
i = someIndex;
tempBitmap= res.getIdentifier(someArray[i], "drawable", "com.novoda.wallpaper");
c.drawBitmap(BitmapFactory.decodeResource(getResources(), tempBitmap), 20, 120, null);


I haven't tried this, I assume its wrong or possibly there is an easier way? I would like your thoughts on the idea of what I'm trying to do.

Thanks
- Josh
gfxcomplex
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Jul 24, 2010 8:46 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 1 guest