4

If I put my application resources in drawable-xdpi then it is automatically down converted for hdpi, mdpi and ldpi by ration 0.75, 0.05 and so on.

Why we need to create extra resource if one type is enough only?

I believe it is enough if I create for xhdpi and let Android down scales automatically. I have gone through this question What is the best way to create drawables for different dpi but no one has given answer that yes you can go this way.

Suppose I kept my images in xhdpi and when app opens in hdpi it will reduce size to 0.75, when it opens in mdpi it reduces size to 0.5.

So what is best way to create draw able asset? Please suggest perfect way with valid reason.

If not needed why we are creating so many resources instead for one only like xdpi?

Community
  • 1
  • 1
mayur bhagat
  • 209
  • 3
  • 12

2 Answers2

2

If u want to display same image with different resolutions in devices

xhdpi image then place it drawable-xhdpi
hdpi image then place it in drawable-hdpi** 

or to maintain a drawable folder place all the images what you want to display it will display with same size in all devices irrespective of the resolution.

Danny
  • 1,050
  • 3
  • 11
  • 26
  • 1
    you are right and really thanks for sharing info for single drawable .But actually it was not my question.You can once read my question once again.I am asking key benefit of keeping more images in separate folders as single image is also solving problem. – mayur bhagat Mar 02 '13 at 12:25
2

There are two reasons to provide more than one image:

  1. it is more efficient to load an image that is already the correct size.
  2. The automatic downscaling may produce artifacts, which can be disturbing especially for small images. So if you want a pixel perfect image it is better to provide one in the correct size.

If none of them is a problem for you, it is also fine to go just with one image.

Henry
  • 42,982
  • 7
  • 68
  • 84