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?
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)
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.
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.
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
these are image folders for different densities.
hdpi
images 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With