In expandable Notifications: what dimensions (in dp) should the icons have? Like the Icons for Snooze and Email here:
5 Answers
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

- 133,643
- 45
- 263
- 274
-
[Here a reference to the Javadoc](http://developer.android.com/reference/android/app/Notification.Builder.html#addAction%28int,%20java.lang.CharSequence,%20android.app.PendingIntent%29) – Brais Gabin Aug 07 '14 at 19:31
-
4What'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? – android developer Nov 04 '14 at 15:25
-
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. – BladeCoder Dec 28 '14 at 23:38
-
2@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 Mar 23 '15 at 06:52
-
1note that the Android JavaDocs regarding this (linked to above) contradict the Android Iconography design style guide
http://developer.android.com/design/style/iconography.html – straya Mar 23 '15 at 07:21 -
@straya I don't understand. Maybe there is an image that shows what it is? – android developer Mar 23 '15 at 14:50
-
What is **Optical Square**, I can't seem to understand it? – IgorGanapolsky Jun 23 '16 at 13:57
-
@IgorGanapolsky See what's referenced as "Live area" in the design docs here: https://material.google.com/style/icons.html#icons-system-icons – Kevin Coppock Jun 23 '16 at 18:54
-
@kcoppock That guide does not mention notifications at all. – IgorGanapolsky Jun 23 '16 at 19:05
-
It's the same concept. – Kevin Coppock Jun 23 '16 at 19:29
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/

- 7,933
- 3
- 54
- 57
I did a tear down of the gmail apk: it seems those icons are 32 x 32 dp
hope someone can confirm this

- 805
- 1
- 8
- 16
Preferred Notification Icon Size 24x24dp
mdpi @ 24.00dp = 24.00px
hdpi @ 24.00dp = 36.00px
xhdpi @ 24.00dp = 48.00px

- 8,336
- 2
- 60
- 69
Wow, the answers here seem to mix apples and pears without references or a definitive answer. What you're usually interested in when creating an icon image is the size in pixels, not dp (density-independent pixels).
Looking at the UI guidelines for status bar icons on the official Android Developer website, it clearly lists the recommended icon sizes in pixels.
lpdi mdpi hdpi xhdpi
Status bar icon size
in pixels 18x18px 24x24px 36x36px 48x48px
(Android 3.0 and later)
You can also include a few pixels of padding in status bar icons to maintain a consistent visual weight with adjacent icons. For example, a 48 x 48 pixel xhdpi status bar icon can contain a 44 x 44 pixel shape with 2 pixels on each side for padding.

- 17,157
- 19
- 104
- 189