Lucky Day's Wizard War! for Android development thread
View Single Post
August 26th, 2013, 05:03
Got some of the memory under control. Instead of a background Drawable scaling itself to the dimensions of a Weapon Button I changed the button to a standard ImageView.
I then scrape the ImageView for its height and width, then create a Bitmap from the image resource, scale it to those dimensions then make it the image of the new view.
you'll notice aspect ration stays intact compared the image above.
On top of this I declared only one Bitmap for the entire Activity and recycle and gc it just before I set the new value.
So far I've stressed it and at the worst it seems to get about 21mb. So far so good but I would like to get it better.
edit: scaling fixed, with no noticeable change in memory
Developer of The Wizard's Grave Android game. Discussion Thread:
Last edited by Lucky Day; August 26th, 2013 at
Join Date: Oct 2006
Location: The Uncanny Valley
View Public Profile
Send a private message to Lucky Day
Find More Posts by Lucky Day