Search code examples
androidmaterial-design

What are correct asset sizes for Android 8 status bar icons (Android gives conflicting info)


Should an Android status bar icon be sized at 24dp or 18dp?

I see conflicting advice/examples:

  • 24dp from Android API guidelines
  • 24dp from Android icon templates pack
    • the actual mdpi PSD file is 24px, which @1x is 24dp
  • 18dp measured from a screenshot from a Pixel phone
    • the icon measures 47px. Divide by pixel density of 2.6 to get to @1x = 18dp

Meanwhile, according to material design guidelines, the status bar itself is 24dp tall, which matches screenshot measurement (63px / 2.6 = 24dp). But if those are true, then a status bar icon must be smaller.


Solution

  • As stated in the documentation you linked, the icons should be provided at a size of 24x24 dp. The reason they appear smaller is that the system will automatically shrink them:

    The system may dim and shrink status bar icons to allow users to focus on the foreground activity. For example, in Android 4.0, the platform-standard status bar for handset-size devices reduces icons to 18 x 18 dip and 40% opacity in the status bar, while drawing them full-size and at full intensity in the expanded notification panel.