I basically have a class within another class (child). I’m trying to get the width of a bitmap that’s in my “drawable” folder. I though this would be a simple operation but of course anything with android development isn’t simple :-/
Anyhow the code I’ve tried is:
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPurgeable = true;
this._backgroundImage = BitmapFactory.decodeResource(Resources res,com.forwardapps.tanks.R.drawable.battlefield, options);
The error is: “Resources cannot be resolved to a variable”. I’ve got no idea what’s suppose to go into this field? A resource of what?
If you can solve this it would save me a great deal of time! Thanks!
You have:
Note the first parameter of
decodeResource. It should be: