简体   繁体   English

XXHDPI 的 Android 背景图片大小

[英]Android background image size for XXHDPI

I need to set the background picture for my app, the only problem is that i dont know what size the image has to be for XXHDPI devices.我需要为我的应用程序设置背景图片,唯一的问题是我不知道 XXHDPI 设备的图像大小。

I read here for MDPI, HDPI and XHDPI devices, but nothing for XXHDPI: Android splash screen image sizes to fit all devices我在这里阅读了 MDPI、HDPI 和 XHDPI 设备,但没有阅读 XXHDPI: 适用于所有设备的 Android 启动屏幕图像大小

So, what size does the background has to be for drawable-xxhdpi folder?那么,drawable-xxhdpi 文件夹的背景大小必须是多少?

MDPI is your baseline. MDPI 是您的基准。 Means the base size, which is ~160dpi.表示基本尺寸,约为 160dpi。 Every other density qualifier is calculated based on the baseline每隔一个密度限定符是根据基线计算的

HDPI is 1.5*MDPI HDPI 为 1.5*MDPI

XHDPI is 2*MPDI XHDPI 为 2*MPDI

XXHDPI is 3*MDPI XXHDPI 是 3*MDPI

XXXHDPI is 4*MDPI XXXHDPI 是 4*MDPI

Or, see this table for a better description或者,请参阅此表以获得更好的描述

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

See this image for more information查看此图片了解更多信息

在此处输入图片说明

Source: https://developer.android.com/training/multiscreen/screendensities来源: https : //developer.android.com/training/multiscreen/screendensities

You need this你需要这个

and this: MDPI: x1, HDPI: x1.5, XHDPI: x2, XXHDPI: x3和这个:MDPI:x1,HDPI:x1.5,XHDPI:x2,XXHDPI:x3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM