Android Drawable Density Guide: mdpi Through xxxhdpi
Export Android drawable and mipmap PNGs across mdpi, hdpi, xhdpi, xxhdpi, and xxxhdpi from one master—ready to merge into res/ folders.
In short
Generate density-scaled PNG packs for launcher and in-app bitmaps, then verify on both budget and flagship devices.
Ship the full mdpi–xxxhdpi ladder from one high-resolution master so Android picks the correct bucket per device instead of upscaling a single xxhdpi file.
Density multipliers at a glance
Baseline mdpi is 1×; hdpi 1.5×; xhdpi 2×; xxhdpi 3×; xxxhdpi 4× relative to mdpi for the same logical size. A 48dp launcher icon needs proportionally larger PNGs in each folder.
If your master is 192×192 px, verify which bucket that maps to before copying—do not assume one file size fits all folders.
Mipmap vs drawable
Launcher icons traditionally live under mipmap-* so launchers do not pick the wrong density from drawable. In-app tab bitmaps often use drawable-*—keep launcher and UI art in separate trees to avoid merge conflicts.
Flavor and module pitfalls
Product flavors can override res/ per brand. Regenerate ZIPs per flavor when white-label apps share code but not artwork.
After copying, run `./gradlew assembleDebug` on CI—not only Android Studio preview—to catch missing xxxhdpi in release builds.
Why this works
- Density buckets match how Android resolves drawables at runtime.
- Folder layout mirrors standard res/drawable-* and mipmap-* conventions.
- One regeneration pass keeps all densities aligned after brand updates.
When to use this workflow
- You are adding launcher or in-app tab bitmaps to a new Android module.
- Emulators look sharp but physical phones show soft icons (often missing xxxhdpi).
- You rebranded and must replace every density folder at once.
Step-by-step guide
- Start from a square or documented aspect master with safe padding for launcher masks.
- Generate the density ZIP and inspect folder names before copying.
- Merge into the correct module res/ tree (main vs product flavor).
- Rebuild and install on a low-density emulator and a flagship phone.
- Compare against adaptive icon previews if you also ship foreground/background layers.
Common mistakes to avoid
- Copying only xxhdpi and xxxhdpi because mid-density emulators looked fine.
- Confusing adaptive launcher layers with flat drawable PNG packs.
- Placing marketing Play Store graphics into mipmap folders.
Frequently asked questions
Are these the same as adaptive icon layers?
No. Adaptive icons use separate foreground and background layers with safe zones. This workflow outputs density-scaled PNGs you merge into drawable or mipmap folders manually.
Which density matters most in 2026?
xxhdpi and xxxhdpi cover many active phones, but skipping mdpi–xhdpi still breaks older devices and some tablets. Ship the full set when file size allows.
