Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What package to download for material design icons?

If I go to https://design.google.com/icons/ and I select an icon to download, it gives me the option of downloading the 18dp, 24dp, 36dp, or 48dp version. I downloaded the 24dp package and it came with the hdpi, mdpi, xhdpi, xxhdpi, and xxxhdpi images. So I'm not sure what the difference is from downloading the other packages of 18dp, 36dp, or 48dp. Does anyone know the difference? What would be the best one to download to have the best compatibility across the majority of android devices?

like image 229
David Velasquez Avatar asked Feb 19 '16 13:02

David Velasquez


2 Answers

So I'm not sure what the difference is from downloading the other packages of 18dp, 36dp, or 48dp.

If you download 24dp icon package it will contain folowing images:

  • 24x24px mdpi (1x)
  • 36x36px hdpi (1.5x)
  • 48x48px xhdpi (2x)
  • 72x72px xxhdpi (3x)
  • 96x96px xxxhdpi (4x)

All of these will produce a 24dp image on screens with varying DPI. It works in a similar fashion with other base sizes.

Which size to get?

Toolbars icons are generally 24dp.

Notification icons are 24dp.

A default button is 36dp tall (plus 6dp on top and bottom making it 48dp in total) so I wouldn't go past 36dp for an icon. Anything beyond that would stretch the button.

like image 87
Eugen Pechanec Avatar answered Sep 29 '22 11:09

Eugen Pechanec


The 18dp, 24dp, 36dp and 48dp are the optimal size of the icons. If you were to add those icon in ImageView and did wrap_content for height or width they would be 18, 24, 36 or 48dp respectivley. Which means they look best for that width and height.

Now hdpi, mdpi, xhdpi, xxhdpi, and xxxhdpi are for supporting multiple devices with different resolutions. If you want more information about each of them checkout http://developer.android.com/guide/practices/screens_support.html

like image 22
Shashank Udupa Avatar answered Sep 29 '22 11:09

Shashank Udupa