Android 可绘制hdpi、可绘制ldpi、可绘制mdpi、可绘制xhdpi和可绘制xxhdpi的含义是什么
我真的很困惑,在res下android drawable类型的drawable hdpi、drawable ldpi、drawable mdpi、drawable xhdpi和drawable xxhdpi的意义是什么,以及如何决定应该使用哪一种?这些用于放置不同分辨率的图像,以满足设备不同的屏幕尺寸。有关更多信息,请选中:这些文件夹允许您存储图片的多个不同质量版本,以便更快的手机可以显示质量更好的图片,而更旧、更慢的手机仍然允许应用程序运行,尽管图片质量较低。这在很大程度上还取决于您的手机使用哪种DPI。如果你想要更多的信息,你可以在网上阅读Android 可绘制hdpi、可绘制ldpi、可绘制mdpi、可绘制xhdpi和可绘制xxhdpi的含义是什么,android,Android,我真的很困惑,在res下android drawable类型的drawable hdpi、drawable ldpi、drawable mdpi、drawable xhdpi和drawable xxhdpi的意义是什么,以及如何决定应该使用哪一种?这些用于放置不同分辨率的图像,以满足设备不同的屏幕尺寸。有关更多信息,请选中:这些文件夹允许您存储图片的多个不同质量版本,以便更快的手机可以显示质量更好的图片,而更旧、更慢的手机仍然允许应用程序运行,尽管图片质量较低。这在很大程度上还取决于您的手机使用
因此,当您创建
可绘制hdpi、可绘制ldpi、可绘制mdpi、可绘制xhdpi和可绘制xxhdpi时,手机会根据其像素密度适当地获取资源。如果未指定任何内容,它将从可绘制
获取资源。有关更多详细信息,请查看这些是不同密度的图像文件夹
hdpi
适用于Android宽屏设备或更高分辨率的Android手机的图像
ldpi
早期安卓系统支持的较低图像质量
mdpi
用于中等图像支持
xhdi
具有最大分辨率的设备。Android将设备分为两类
- xlarge、sw800dp等的分辨率(主要用于布局文件夹)
- 基于DPI,DPI是图像的主要点,在可绘制hdpi、可绘制ldpi、可绘制mdpi、可绘制xhdpi和可绘制xxhdpi中处理
更多解释
我的HTC explorer
屏幕在小屏幕下,但由于每英寸像素密度高,它从可绘制的hdpi拍摄图像10英寸屏幕的Samsung Tab
属于大屏幕类别,但从可绘制mdpi拍摄图像我想你忘记了方向
,纵横比
方向不会影响任何与可绘制和密度相关的内容。
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.