What is the meaning of drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xhdpi and drawable-xxhdpi

I am really confused. What is the value of drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xhdpi and drawable-xxhdpi like android drawable under res and how to decide which one to use sholud?

+10
android
source share
6 answers

By default, Android supports three folders for resources (images) with different resolutions, the reason for this is the use or resolution of the Android device on which the application will run.

  • The hdpi image folder stores images for a widescreen Android set or higher resolution Android phones.

  • An ldpi image folder for lower image quality, which is supported by earlier Android suites

  • mdpi folder for medium image support

  • Xhdpi image folder for high resolution devices.

  • Xxhdpi image folder for extra-large devices / maximum resolution (As with Google Nexus 10, you need to add a 144 * 144 pixel icon to the drawable-xxhdpi or drawable-480dpi folder.)

Android OS selects the image itself, checking the compatible device and its resolution.

+11
source share
ldpi Resources for low-density (ldpi) screens (~120dpi). mdpi Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.) hdpi Resources for high-density (hdpi) screens (~240dpi). xhdpi Resources for extra high-density (xhdpi) screens (~320dpi). nodpi Resources for all densities. These are density-independent resources. The system does not scale resources tagged with this qualifier, regardless of the current screen density. tvdpi Resources for screens somewhere between mdpi and hdpi; approximately 213dpi. This is not considered a "primary" density group. It is mostly intended for televisions and most apps shouldn't need it—providing mdpi and hdpi resources is sufficient for most apps and the system will scale them as appropriate. If you find it necessary to provide tvdpi resources, you should size them at a factor of 1.33*mdpi. For example, a 100px x 100px image for mdpi screens should be 133px x 133px for tvdpi. 

Therefore, when you create drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xhdpi and drawable-xxhdpi phone takes resources accordingly according to its pixel density. If nothing is specified, it will retrieve resources from drawable . Check here for more details.

+8
source share

They are used to place images of different resolutions for different screen sizes of devices. For more information check out: http://developer.android.com/guide/practices/screens_support.html

0
source share

These folders allow you to store several different quality versions of the image so that the faster phone can display a higher quality image, while the older, slower phone still allows you to run the application, albeit with lower quality images. It also depends heavily on the DPI of your phone that it uses. If you need more information, you can read it on this site (developer.android) .

0
source share

these are image folders for different densities.

hdpi images for Android Broad Screen or higher resolution Android phones.

ldpi Lower image quality supported by earlier android sets

mdpi for medium image support

xhdi devices with maximum resolution.

0
source share

Android device categories on two bases

  • Resolution which is xlarge, sw800dp, etc. (mainly for the Layout folder)
  • The DPI base, which is the main point for the image, which is a handle to drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xhdpi and drawable-xxhdpi

More details

My HTC explorer screen is under a small screen, but due to the high pixel density per inch, it accepts an image with drawable-hdpi . Samsung Tab with a 10-inch screen comes under a large screen category, but with drawable-mdpi images .

0
source share

All Articles