2
votes

So, in regards to this stackoverflow accepted answer: How do I convert ppi into dpi for Android images?

So, ok, i make each background image the dimensions that that guy specifies in the answer. BUT, if i define the other ImageViews (smaller ones), that are placed on the screen, in relation to the sizes defined above (e.g. let's say an ImageView has dimensions 20x20 for the hdpi devices, if i calculate this dimensions for the ldpi devices, the image would have to be 7x7 pixels, which is terribly small) then the ldpi devices won't be able to see anything on the screen :) Or will they? Am i doing it right, or not?

I'm terribly confused. Can someone clarify this for me please? :)

2

2 Answers

2
votes

The resolutions mentioned in the other question will always fill the screen, but you should provide different layout files for each screen size to stay dpi independent (if you so wish).

Look at the example from the dev page http://developer.android.com/images/screens_support/density-test-good.png

Also, it always helps to fire up the appropriate simulator (middle size with mdpi, smallest size with ldpi and biggest size with hdpi, depending on what devices you are planning to support) and try your layouts out.

1
votes

Your images should be at least the size which can be easily viewable, or even clickable for the user on his/her devices.

The guidelines are for specific images, like launcher icons, or menu items, and not necessarily for any images you use in your app. For these kind of images, you are the best judge of specifying the image sizes and resolutions.

You could well have those images as only mdpi, and supply an hdpi version, so that it atleast has a higher resolution image for hdpi and xdpi devices.