Search code examples
androidimageresourcesdrawablescreen-resolution

Android Application Background Resolution


I want to design a background for android application using Photoshop , let's say I have Samsung S4,So I set the resolution to the maximum of that device which is 1080x1920 and 441dpi

Now,my question is where should i insert it in what subfolder of Resources and depending on what we choose that folder

-drawable-hdpi
-drawable-ldpi
-drawable-mdpi
-drawable-xhdpi
-drawable-xxhdpi

What image feature decides on which folder image should be in?


Solution

  • Hopefully, this image will show you which category it falls into: enter image description here

    As you can see everything larger than 400dpi is xxhdpi, so you should place it there.

    Also check out the DisplayMetrics page.

    EDIT: To answer your last question. There isn't any image feature that determines where it belongs, the folders are simply used to load images with different resolutions onto different screens. For example if the picture containing text has high resolution and you place it on a low density screen, the text would be (physically) too small to read. So you place a higher resolution image in hdpi or xhdpi folder and resize it so it has smaller resolution and place it in ldpi and mdpi folders.