Can anyone try to explain to me what 'getResource( )' is?
I have some code running inside my game loop, all I need to do is display images on the canvas/infront of the canvas:
I've looking into a number of different methods and most use getResource(), what is it and why can it not be resolved in my code? Do I need to import a library or is it referring to another piece of my code?.
I have some code running inside my game loop, all I need to do is display images on the canvas/infront of the canvas:
p=new Paint();
Bitmap b=BitmapFactory.decodeResource(getResources(), R.drawable.img1);
p.setColor(Color.RED);
canvas.drawBitmap(b, 0, 0, p);
Bitmap b=BitmapFactory.decodeResource(getResources(), R.drawable.img1);
p.setColor(Color.RED);
canvas.drawBitmap(b, 0, 0, p);