Skip to content

Instantly share code, notes, and snippets.

@liamspradlin
Last active February 1, 2021 19:41
Show Gist options
  • Save liamspradlin/d66e12f1da16c6103b527d5ee6250a03 to your computer and use it in GitHub Desktop.
Save liamspradlin/d66e12f1da16c6103b527d5ee6250a03 to your computer and use it in GitHub Desktop.
Density Qualifier Denisty Value Scale Description
ldpi ~120dpi 0.75x Resources for low-density (ldpi) screens.
mdpi ~160dpi 1x Resources for medium-density (mdpi) screens. (This is the baseline density.)
hdpi ~240dpi 1.5x Resources for high-density (hdpi) screens.
xhdpi ~320dpi 2x Resources for extra-high-density (xhdpi) screens.
xxhdpi ~480dpi 3x Resources for extra-extra-high-density (xxhdpi) screens.
xxxhdpi ~640dpi 4x Resources for extra-extra-extra-high-density (xxxhdpi) uses.
nodpi n/a 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 ~213dpi 1.33x 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment