1

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.

mattthew
  • 528
  • 4
  • 11

1 Answers1

2

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.

Ben P.
  • 52,661
  • 6
  • 95
  • 123
  • Thanks, I clearly missed that part of the docs! Follow-up question: Are there any other assets the get resized on the fly like that? All the designer2developer workflow guidelines say that if designs are done in mdpi res., then exported assets will be WYSISYG. Are status bar icons the only exception to that rule? – mattthew Jan 24 '18 at 22:30
  • 1
    @mattthew I can't say definitively, but I can't think of anything else that gets autoresized like that (outside of very obvious cases like ImageView with certain scaleType values). – Ben P. Jan 24 '18 at 22:36
  • Has Android some function that can be used to return a size of the status bar icons on current environment? – Ωmega Feb 13 '18 at 20:50