I am confused about how to write resolution-independent code for an Android game, and I'm looking for a few quick tips and tricks, as I'm never sure what to do with multiple versions of Android. Here is what I specifically want to do:
Can someone explain what I would do in the above situation to get the results that I want?
What particularly bothers me is:
- How does API1.6 choose which folder (for example, -hdpi) to load the bitmap image and how does it decide what to scale it to?
- Does API 1.5 have some sort of auto-scaling feature? The width and height reported by the canvas seem to scale according to the density of the screen.
source
share