XXHDPI的Android背景图像大小

XXHDPI的Android背景图像大小,android,background,png,drawable,Android,Background,Png,Drawable,我需要为我的应用程序设置背景图片,唯一的问题是我不知道XXHDPI设备的图像大小 我在这里阅读了MDPI、HDPI和XHDPI设备,但没有阅读XXHDPI: 那么,对于可绘制的xxhdpi文件夹,背景的大小必须是多少?您需要 这是: MDPI:x1, HDPI:x1.5, XHDPI:x2, XXHDPI:x3MDPI是您的基线。指基本尺寸,约为160dpi。根据基线计算其他每一个密度限定符 HDPI为1.5*MDPI XHDPI是2*MPDI XXHDPI是3*MDPI XXXHDPI是4*

我需要为我的应用程序设置背景图片,唯一的问题是我不知道XXHDPI设备的图像大小

我在这里阅读了MDPI、HDPI和XHDPI设备,但没有阅读XXHDPI:

那么,对于可绘制的xxhdpi文件夹,背景的大小必须是多少?

您需要

这是: MDPI:x1, HDPI:x1.5, XHDPI:x2,
XXHDPI:x3

MDPI是您的基线。指基本尺寸,约为160dpi。根据基线计算其他每一个密度限定符

HDPI为1.5*MDPI

XHDPI是2*MPDI

XXHDPI是3*MDPI

XXXHDPI是4*MDPI

或者,有关更好的说明,请参见此表

| Density Qualifier | Factor                 | DPI  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|-------------------|------------------------|------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ldpi              | MDPI / 1.33            | ~120 | Resources for low-density (ldpi) screens (~120dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| mdpi              | MDPI * 1               | ~160 | Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.)                                                                                                                                                                                                                                                                                                                                                                                                                       |
| hdpi              | MDPI * 1.5             | ~240 | Resources for high-density (hdpi) screens (~240dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| xhdpi             | MDPI * 2               | ~320 | Resources for extra-high-density (xhdpi) screens (~320dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| xxhdpi            | MDPI * 3               | ~480 | Resources for extra-extra-high-density (xxhdpi) screens (~480dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| xxxhdpi           | MDPI * 4               | ~640 | Resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi).                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| nodpi             | See description        | n/a  | 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             | Recommended: MDPI*1.33 | ~213 | 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. |
有关更多信息,请参见此图


来源:

我知道这适用于图标,但它也适用于背景吗?我很抱歉。甚至没看到你回复我。。。这取决于很多不同的事情。但对于较小的应用程序,我只会跳过hdpi、mdpi和ldpi,将它们全部放在/drawable中,将高分辨率图像放在那里,而密度较低的手机会缩小它们的比例。目前还没有提到xxhdpi。。。我不知道你是怎么得到3*mdpi的,但是thx!我不知道你发布链接时它是否没有说,但现在它说了下面的
mdpi(中等)~160dpi
xxhdpi(超高)~480dpi
。这就是我得到MDPI*3的原因