What are the sizes of the icons in Android notifications action-buttons?

45,974

Solution 1

So to clarify this, I found the following in the Javadoc within the Android support library:

Add an action to this notification. Actions are typically displayed by the system as a button adjacent to the notification content.

Every action must have an icon (32dp square and matching the Holo Dark action bar visual style, a textual label, and a PendingIntent.

A notification in its expanded form can display up to 3 actions, from left to right in the order they were added. Actions will not be displayed when the notification is collapsed, however, so be sure that any essential functions may be accessed by the user in some other way.

So these should be identical to your action bar icons (for the Holo Dark theme), which is:

Asset Size: 32dp x 32dp
Optical Square: 24dp x 24dp
Color (Enabled): #FFFFFF 80% opacity
Color (Disabled): #FFFFFF 30% opacity

Solution 2

In Pixels:

22 × 22 area in 24 × 24 (mdpi)

33 × 33 area in 36 × 36 (hdpi)

44 × 44 area in 48 × 48 (xhdpi)

66 × 66 area in 72 × 72 (xxhdpi)

88 × 88 area in 96 × 96 (xxxhdpi)

as seen on http://iconhandbook.co.uk/reference/chart/android/

Solution 3

I did a tear down of the gmail apk: it seems those icons are 32 x 32 dp

hope someone can confirm this

Solution 4

Preferred Notification Icon Size 24x24dp

mdpi @ 24.00dp = 24.00px
hdpi @ 24.00dp = 36.00px
xhdpi @ 24.00dp = 48.00px

Share:
45,974
herrmarek
Author by

herrmarek

UI/UX Designer and Frontend Developer.

Updated on December 03, 2020

Comments

  • herrmarek
    herrmarek over 3 years

    In expandable Notifications: what dimensions (in dp) should the icons have? Like the Icons for Snooze and Email here:

    Image from developer.android.com

  • Takhion
    Takhion over 10 years
    Yes, 32dp size and 24dp optical square!
  • Brais Gabin
    Brais Gabin almost 10 years
  • android developer
    android developer over 9 years
    What's "optical square" ? Is it the real content? if so, then why do we need it, instead of using the real size of the image file, so that we will only use what we really need?
  • BladeCoder
    BladeCoder over 9 years
    Can you confirm this is still true for the new Material Design guidelines ? In Material Design the Action Bar icons are smaller (24dp) and fully opaque.
  • straya
    straya about 9 years
    @android developer you can go outside the optical bounds. Hopefully you do so only when it is needed, e.g. when the shape/weight of an icon necessitates a slightly different "center of gravity".
  • straya
    straya about 9 years
    note that the Android JavaDocs regarding this (linked to above) contradict the Android Iconography design style guide <golf claps> developer.android.com/design/style/iconography.html
  • android developer
    android developer about 9 years
    @straya I don't understand. Maybe there is an image that shows what it is?
  • IgorGanapolsky
    IgorGanapolsky almost 8 years
    What is Optical Square, I can't seem to understand it?
  • IgorGanapolsky
    IgorGanapolsky almost 8 years
    What is optical square?
  • Kevin Coppock
    Kevin Coppock almost 8 years
    @IgorGanapolsky See what's referenced as "Live area" in the design docs here: material.google.com/style/icons.html#icons-system-icons
  • IgorGanapolsky
    IgorGanapolsky almost 8 years
    @kcoppock That guide does not mention notifications at all.
  • Kevin Coppock
    Kevin Coppock almost 8 years
    It's the same concept.