Maybe i don't understand the question, but here goes:
I don't know what gContext and context are, but you have a Resource "res" from gContext, and get the drawables from 'context' ?
So if we make this a really simple case, lets say you only have one activity, and this is all done in the onCreate of that activity, you should be able to do this:
* you have a file "myfile.png" in your drawable dir
- Code: Select all
Drawable d = getResources().getDrawable(R.drawable.myfile);
//do something with d. like draw it on the canvas