Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

I read here for MDPI, HDPI and XHDPI devices, but nothing for XXHDPI: Android splash screen image sizes to fit all devices

So, what size does the background has to be for drawable-xxhdpi folder?

like image 239
user2262637 Avatar asked Oct 29 '13 14:10

user2262637


People also ask

How do I check image size on android?

On android go to photos, select your photo and click the ... in the top right. Scroll to bottom of page to find image size.

Why is it problematic to define size using pixels on Android?

Why is it problematic to define sizes using pixels on Android? Although screen pixel density varies, this does not impact the use of pixels to define sizes. Large devices always have more pixels, so your UI elements will be e=affected if you define them with pixels.


1 Answers

MDPI is your baseline. Means the base size, which is ~160dpi. Every other density qualifier is calculated based on the baseline

HDPI is 1.5*MDPI

XHDPI is 2*MPDI

XXHDPI is 3*MDPI

XXXHDPI is 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

enter image description here

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

like image 87
Musterknabe Avatar answered Sep 18 '22 18:09

Musterknabe