My app consists of a round ball whose radius I have specified as 35 pixels in the code. The user muse prevent the ball from colliding with other balls.
I have drawn an 800 px by 800 px vector graphic with 72 ppi resolution that I want to use as the bitmap for this image.
What sizes do I scale the image to for the drawable-ldpi, -mdpi and -hdpi folders so that the bitmap is the same size on all devices and also so that the collision detection works fine ? i.e. The app calculates the ball to be 35 pixels but the screen shows a smaller or larger image so the collisions will be all wrong and the user won’t know what’s going on.
I really don’t know much about this so any help will be hugely appreciated.
From the android developer guide:
Also, one of the best practices for supporting multiple screen resolutions is: “Do not use hard-coded pixel values in your application code”.
Since your applications deals with pixel values at runtime, you might want to read the section Additional Density Considerations and below that section.