I've got the following problem
I want to create many instances of a view (dinamically). Each view can have one of 6 possible icons. What I wanted to do create a static Bitmap so that I can use in in the Draw function withouth having the same icon on memory 40 times....
like so:
public static final Bitmap InstinctBitmap = Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.tech), SmallIconSide, SmallIconSide, false);
Obviously this doesn't work because getResources() is not static. Any workaround? Or is this a bad Idea?
The onDraw method of the view keeps telling me that is a bad Idea to instatiate objects in it, so this is the choice I made
Any help would be greatly appreciated.