Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What dp should I use for Android icons?

Tags:

android

icons

I found this LINK that outlines what dimensions of images/icons/notifications/etc in Android should be. I then looked for some solid standard icons and stumbled upon Google's REPOSITORY. Each icon exists in 18, 24, 36, and 48dp. I can then download each image for mdpi, hdpi, xhdpi, xxhdpi, and xxxhdpi.

Why do they offer the 4 different dp's if for each of the dp's I get the icon for all 6 folders (mdpi, hdpi, etc)? Also, which dp is the best? Should I use 48 simply because it's the most crisp?

like image 455
Matt Avatar asked Jul 10 '15 01:07

Matt


3 Answers

Size which you pick from this is image size. Each folder inside, is that image, with that size, scaled to proper resolution for each device type screen size (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi).

Which size you will use, it's your choice (or Material Design, if you decide to follow these rules).

like image 71
Damian Kozlak Avatar answered Nov 10 '22 18:11

Damian Kozlak


The key here is to support multiple screens and different densities.
Almost every application should have alternative drawable resources for different screen densities, because almost every application has a launcher icon and that icon should look good on all screen densities. Likewise, if you include other bitmap drawables in your application (such as for menu icons or other graphics in your application), you should provide alternative versions or each one, for different densities.

To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratio between the six generalized densities.

Relative sizes for bitmap drawables that support each density.

A set of six generalized densities:

  • ldpi (low) ~120dpi
  • mdpi (medium) ~160dpi
  • hdpi (high) ~240dpi
  • xhdpi (extra-high) ~320dpi
  • xxhdpi (extra-extra-high) ~480dpi
  • xxxhdpi (extra-extra-extra-high) ~640dpi

For more information, please refer to the developer site.

like image 35
Lazy Ninja Avatar answered Nov 10 '22 18:11

Lazy Ninja


18dp is for small contextual icons

24dp is for notification icons

36dp is for action bar, dialog & tab icons

48dp is for launcher icons

like image 1
marcelnijman Avatar answered Nov 10 '22 19:11

marcelnijman