How to choose the right image for Android

I struggled with this a couple of days. I am trying to write a small customizable rating panel. With some custom images. When I check the image that I have on my HTC Desire, the image looks terribly aliased. I tried using different resolutions and different sizes and still can not understand what resolution / how to create good quality.

I read the recommendations on the Android website, but to no avail. I think the problem I am facing is displaying lower resolution images on a higher dpi display. Thus, the system scales the image. But I'm not sure how to fix this. Higher resolution images? Large images?

Any advice would be great.

Alex

+8
android uiimage
source share
1 answer

The reason this is a bit of a challenge is the wide selection of screen resolutions and the density of Android devices. Fortunately, the Android SDK has fairly extensive support in this department. A very good start in this section of the Android Dev guide.

Basically, you need to understand the concept of Density without pixel density and use classes like DisplayMetrics to calculate the actual pixels of the screen. And yes, obviously, you will need larger, higher resolution images for higher density screens.

+3
source share

All Articles