Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

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

like image 219
shaby Avatar asked Nov 19 '13 12:11

shaby


People also ask

What is Hdpi Mdpi Xhdpi?

1.0x — medium-density (mdpi) 1.5x — high-density (hdpi) 2.0x — extra-high-density (xdpi) 3.0x — extra-extra-high-density (xxhdpi) 4.0x — extra-extra-extra-high-density (xxxhdpi)

What is the difference between Mdpi and Hdpi?

The size are not exact but upto 130dpi it is considered small, from 130 to 180 it can be considered mdpi, from 180 to 200 it can be considered as hdpi and the higher is classified as xdpi.

What is drawable Xxhdpi?

Drawable xhdpi 官网 Compatible with IntelliJ IDEA (Ultimate, Community, Educational), Android Studio and 13 more. Quickly and easily convert images into images of various densities (LDPI, MDPI, HDPI, XHDPI, XXHDPI, XXXHDPI) used by Android.


2 Answers

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's 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.

So when you create drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xhdpi and drawable-xxhdpi the phone appropriately takes the resources according to its pixel density.If nothing is specified it will take resources from drawable. For more details check here

like image 70
krishna Avatar answered Sep 21 '22 12:09

krishna


these are image folders for different densities.

hdpiimages for the Android Broad Screen set or Android Phones with the Higher resolution.

ldpi Lower images quality supported by the earlier sets of the android

mdpi for medium images support

xhdi devices with maximum resolution.

like image 36
Hamad Avatar answered Sep 19 '22 12:09

Hamad