With screen resolutions increasing in pixels Google is promoting the use of XXHDPI and XXXHDPI, icons in the official documents.
http://developer.android.com/design/style/iconography.html
But in their official Android download packs they only go up to XHDPI.
http://developer.android.com/design/downloads/index.html
Do they expect us to create these icons when can't be bothered too?
What are other developers doing especially for the Holo icons, are they creating it from SVG.
Update
If you download the the Icon Pack and not the "all pack", it now contains XXHDPI icons but still no XXXHDPI.
http://developer.android.com/downloads/design/Android_Design_Icons_20131106.zip
xhdpi Resources for extra high-density (xhdpi) screens (~320dpi). nodpi Resources for all densities. These are density-independent resources.
Hdpi is a 1.5:1, and can be thought of as a HD (high-definition) display. And xhdpi is 2:1, much like Apple retina displays. . The normal mdpi is based on a 160 dpi screen, which again is the same as a single pixel unit in your graphics software.
Option #1: Just ship the -xxhdpi drawables and let Android downsample them for you at runtime (downside: will only work on fairly recent devices, where -xxhdpi is known). Option #2: Use Android Asset Studio to downsample them for you. Option #3: Automate the process within a graphics editor, per ssantos' answer.
getDisplayMetrics(); Though Android doesn't use a direct pixel mapping, it uses a handful of quantized Density Independent Pixel values then scales to the actual screen size. So the metrics. densityDpi property will be one of the DENSITY_xxx constants ( 120 , 160 , 213 , 240 , 320 , 480 or 640 dpi).
Since they provide ai file, which is vector-based, you can export any scale you want.
Btw, Nexus 5 (and many other 1080p phones) is already XXHDPI, so you are supposed to provide at least XXHDPI icons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With