Graphic Assets for Android (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)
Android's pixel density system is one of the key sources of visual artifacts in finished apps. Blurry icons on flagships, pixelated edges on budget phones, wrong sizes in different folders — all result from incorrect asset preparation.
Densities and Coefficients
Android divides screens into density buckets with mdpi = 1× as base:
| Density | Coefficient | Typical Devices |
|---|---|---|
| mdpi | 1× (160 dpi) | Old budget devices |
| hdpi | 1.5× (240 dpi) | Budget segment |
| xhdpi | 2× (320 dpi) | Mid-range |
| xxhdpi | 3× (480 dpi) | Most flagships |
| xxxhdpi | 4× (640 dpi) | Pixel 8 Pro, Galaxy S24 Ultra |
Base size in dp is specified once. Physical pixel on xxhdpi = dp × 3. 24dp icon = 24px in mdpi, 48px in hdpi, 72px in xhdpi, 96px in xxhdpi, 128px in xxxhdpi.
Vector vs Raster Assets
Simple icons, pictograms, UI elements without photographic detail — always VectorDrawable (Android SVG-like XML format). One file, any density, no blurring. Limitation: doesn't support complex effects (blur, some gradient types), animated illustrations require AnimatedVectorDrawable or Lottie.
For PNG assets (photos, complex illustrations, ad banners) prepare each density separately. Rule: draw in xxxhdpi (4×), scale down. Scaling up always loses quality.
Common Export Mistakes
Blurry edges on xhdpi/xxhdpi. Designer draws 24×24px icon and exports directly without density consideration. On xxhdpi system scales 24px to 72px with bilinear interpolation — blurry. Solution: draw at size for largest density.
Wrong mipmap vs drawable folder. Launcher icons go in mipmap-*. All other assets in drawable-*. System handles mipmap differently when scaling. Putting App Icon in drawable — icon displays correctly, but loses optimization for launcher.
Extra folders. No point in making ldpi (0.75×) — devices with such density haven't existed since 2014. xxxhdpi covers all current flagships. If project doesn't support devices older than 2016, mdpi can be dropped too.
File names. Resource names in Android — lowercase letters, digits, underscore only. ic_Arrow_Right.png causes compile error. ic_arrow_right.png is correct.
Preparation Process
- Get SVG or PDF from designer (vector source)
- Simple icons → convert to
VectorDrawablevia Android Studio (File → New → Vector Asset → Local SVG) - Raster assets → export from Figma with multipliers 1×, 1.5×, 2×, 3×, 4× to corresponding folders
- Verify names match naming convention
- Optimize PNG via
pngquantoroptipngto reduce APK size
What's Included
- Audit of current assets (if any)
- Icon conversion to VectorDrawable
- Raster asset export to 5 densities
- Correct mipmap and drawable folder structure
- File size optimization
- Ready set for Android Studio insertion / developer handoff
Timeline
4 hours — 2 days depending on asset quantity and need for vector format conversion. Cost is calculated individually.







