What Are Drawable Resource Folders?
Android devices ship with wildly different screen densities. A budget phone might pack 160 pixels into one physical inch, while a flagship can exceed 600. If you ship a single bitmap, the system stretches or shrinks it at runtime, producing blurry or wasteful results. To solve this, Android introduced density-qualified resource folders.
Inside your project's res/ directory you create folders such as drawable-mdpi/, drawable-xhdpi/, and so on. Each folder holds the same image file names, but at pixel dimensions appropriate for that density tier. At runtime the Android resource system inspects the device's DisplayMetrics.densityDpi value, maps it to the nearest bucket, and loads the matching asset. If the exact bucket is missing, the system picks the next-higher-density variant and scales it down, which is safe but wastes memory.
The baseline density is mdpi (medium, ~160 dpi), where 1 dp = 1 px. Every other bucket is a multiple of that baseline. Understanding this relationship is essential before you export assets — for a deeper explanation, see What is DPI? and dp vs px vs pt.
Complete Density Bucket Table
The table below lists every standard Android density qualifier. The "Scale" column shows the multiplier relative to mdpi, and the four rightmost columns show the exact pixel dimensions you need for common dp-based icon sizes.
| Folder | DPI range | Scale | 24 dp | 36 dp | 48 dp | 96 dp |
|---|---|---|---|---|---|---|
| drawable-ldpi | ~120 dpi | 0.75x | 18 | 27 | 36 | 72 |
| drawable-mdpi | ~160 dpi | 1x | 24 | 36 | 48 | 96 |
| drawable-hdpi | ~240 dpi | 1.5x | 36 | 54 | 72 | 144 |
| drawable-xhdpi | ~320 dpi | 2x | 48 | 72 | 96 | 192 |
| drawable-xxhdpi | ~480 dpi | 3x | 72 | 108 | 144 | 288 |
| drawable-xxxhdpi | ~640 dpi | 4x | 96 | 144 | 192 | 384 |
ldpi is rarely targeted today — most developers omit it and let the system down-scale from mdpi. In practice, you should always supply at least mdpi through xxhdpi. Include xxxhdpi if your app targets flagship phones or tablets with very high pixel density.
File Naming Conventions
Android's resource compiler enforces strict rules on drawable file names. Violating them causes build errors. Follow these rules for every file inside a drawable or mipmap folder:
- Use only lowercase letters, digits, and underscores.
- The file name must begin with a letter, never a digit or underscore.
- No hyphens, spaces, uppercase characters, or special symbols.
- Allowed extensions:
.png,.jpg,.webp,.xml(vector drawables). - The same file name must appear in every density folder you support, so the resource system can match them.
Good examples: ic_settings_24.png, bg_onboarding_header.webp. Bad examples: Settings-Icon.png (uppercase, hyphen), 2x_logo.png (starts with a digit).
Mipmap vs Drawable Folders
Android provides two parallel sets of density-qualified directories: mipmap-* and drawable-*. They look almost identical but serve different purposes.
mipmap folders are reserved for your app's launcher icon only. When a device is set to a non-standard home screen grid, the launcher may request an icon at a density one level higher than the device's own bucket. Because mipmap resources are never stripped during APK density splits, the higher-resolution variant is still available. If you placed the launcher icon in a drawable folder instead, the build system would strip the non-matching densities and the launcher would have to upscale, resulting in a blurry icon.
drawable folders are for everything else: action bar icons, tab icons, notification icons, backgrounds, illustrations, and any other bitmap or vector asset your app uses.
The directory structure typically looks like this:
res/
mipmap-mdpi/
ic_launcher.webp
ic_launcher_round.webp
mipmap-hdpi/
...
mipmap-xxxhdpi/
...
drawable-mdpi/
ic_settings.png
bg_splash.webp
drawable-hdpi/
...
drawable-xxxhdpi/
...For adaptive launcher icons that use foreground and background layers, see the dedicated guide on Android adaptive icons.
Recommended Sizes by Asset Type
Different UI elements in Android have different recommended dp sizes. The table below summarizes the most common asset types, their standard dp dimensions, and the resulting pixel sizes at each density.
| Asset type | dp size | mdpi | hdpi | xhdpi | xxhdpi | xxxhdpi |
|---|---|---|---|---|---|---|
| Launcher icon | 48 dp | 48 | 72 | 96 | 144 | 192 |
| Adaptive icon layer | 108 dp | 108 | 162 | 216 | 324 | 432 |
| Action bar icon | 24 dp | 24 | 36 | 48 | 72 | 96 |
| Notification icon | 24 dp | 24 | 36 | 48 | 72 | 96 |
| Tab / nav icon | 24 dp | 24 | 36 | 48 | 72 | 96 |
| Dialog icon | 36 dp | 36 | 54 | 72 | 108 | 144 |
| Large feature icon | 96 dp | 96 | 144 | 192 | 288 | 384 |
Launcher icons
The standard launcher icon canvas is 48 dp, producing a 48 px file at mdpi and 192 px at xxxhdpi. Since Android 8.0 (API 26), adaptive icons use a 108 dp canvas with the inner 72 dp designated as the safe zone. Both the foreground and background layers must be provided at 108 dp. Place launcher icons in the mipmap-* folders, not drawable. Google Play requires a separate 512 px icon uploaded directly to the console.
Action bar and toolbar icons
Material Design specifies 24 dp for action bar icons. These should use simple, single-color glyphs and are typically shipped as vector drawables (.xml) rather than bitmaps, eliminating the need for density variants entirely.
Notification icons
Notification icons should be 24 dp and use only white with alpha transparency. The system tints them with the app's accent color on Android 5.0 and above. Colored or complex notification icons render as solid white circles on modern devices.
Tab icons
Bottom navigation and tab icons follow the same 24 dp guideline. If you use BottomNavigationView or the Material 3 NavigationBar, the framework expects 24 dp vector drawables by default. Bitmap alternatives should be placed in the standard drawable density folders.
Best Practices
Start from the highest density and scale down
Design at xxxhdpi (4x) resolution and let your export tool generate the smaller variants. Downscaling preserves detail; upscaling destroys it.
Use vector drawables for simple icons
VectorDrawable XML files scale to any density without quality loss and produce a smaller APK than five PNG copies.
Never put launcher icons in drawable folders
Launcher icons belong in mipmap-* folders so they survive APK density splits and the launcher can load a higher-density variant when needed.
Do not skip intermediate density buckets
Omitting hdpi or xhdpi forces the system to downscale from a larger asset at runtime, wasting memory and CPU cycles.
Prefer WebP over PNG for raster assets
WebP offers 25-35% smaller file sizes than PNG at equivalent quality and is supported on all Android versions from API 14 onward (lossy) and API 18 (lossless with alpha).
Keep file names consistent across folders
Every density folder must contain exactly the same set of file names. A missing file in one folder means the system falls back to scaling, which defeats the purpose of density-specific assets.
Avoid embedding text in bitmap assets
Text in images cannot be translated, resized, or styled. Use Android string resources and render text in code instead.
Automate with App Image Kit
Manually exporting five or six density variants for every asset update is tedious and error-prone. App Image Kit automates the entire process: drop in your highest-resolution source image, and the tool generates correctly-sized files for every Android density bucket instantly. All processing runs in your browser — no image data is uploaded to any server.
Whether you are preparing a new launcher icon, updating notification graphics, or batch-exporting dozens of illustration assets, generating them from a single source file removes an entire category of human error from the workflow.
Further Reading
- What is DPI? — foundational explanation of screen density and why it matters for asset exports.
- dp vs px vs pt — understand the difference between density-independent units across Android, iOS, and the web.
- Android Adaptive Icons — how to structure foreground, background, and monochrome layers for modern launchers.
Ready to export your assets?
App Image Kit generates all density variants from a single source image — free, private, and instant.