Question

So I need a piece of advice. I have a small game that is timed and for the last 5 seconds I want it to display the time remaining in the background( aka countdown: 5 4 3 2 1). Previously I just made large images of the numbers so that it was easy to scale all the images to different screen sizes. Now I am running out of room in the buffer (java.lang.OutOfMemoryError: bitmap size exceeds VM budget) So I want to use drawText to put the numbers in the background, but I need it to scale to the entire screen for every device. Any Suggestions on how to do this?

Thanks -Derek

Was it helpful?

Solution

A solution would be to use "sp" or scale-independent pixels. See more information on what they are and how to use them here: http://developer.android.com/guide/practices/screens_support.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top