I draw, through canvas c, into a (mutable) bitmap b. It gets displayed in image view i.
Now what I am trying to achieve is to resize bitmap b to get smaller or larger (user choice).
Any combination of commands I have tried has just resulted in another bitmap being created and drawn on top of the existing one. I can't have that as there may be many bitmaps created, which would use up too much device memory.
I have the feeling that the solution may have something to do with "recycling" bitmap b, but the post(s) I read on that topic have been eluding me. Do I have to remove the image view i from the activity? Do I have to set the reference to c, b, or i to "null"?
Thank you.
Regards,
Now what I am trying to achieve is to resize bitmap b to get smaller or larger (user choice).
Any combination of commands I have tried has just resulted in another bitmap being created and drawn on top of the existing one. I can't have that as there may be many bitmaps created, which would use up too much device memory.
I have the feeling that the solution may have something to do with "recycling" bitmap b, but the post(s) I read on that topic have been eluding me. Do I have to remove the image view i from the activity? Do I have to set the reference to c, b, or i to "null"?
Thank you.
Regards,