Base layout
All notifications must include the following elements:
- The icon of the originating app
- A title and secondary text
- A timestamp
Notification type may be included if needed.
Notification containing the notification icon, title, additional text, and a timestamp. Layouts personalized with sender information may pair the app’s icon with a sender photo.
All notification types:
Left and right margin: 8dp
Title top margin: 16dp
Title bottom margin: 8dp
Icon top and bottom margin: 12dp
Icon area width: 72dp
Personalized notifications:
Icon bottom padding: 8dp
Summary notifications:
Sender top and bottom margin: 12dp
Title bottom margin: 8dp
Expanded layouts
You can choose how much detail your app's notification provides, such as:
- The first few lines of a message
- A large image preview
- A message in its entirety
The user can pinch open or drag to change from a compact layout to an expanded layout.
For individual notifications, Android provides three expanded layout templates: text, inbox, and image.
Single-event notification on a handheld and wearable device.
Summary notification on a handheld and wearable device.
Expanded notification on a handheld device.
Actions
Android displays actions for common tasks at the bottom of a notification.
Actions should:
- Be time-sensitive and meaningful
- Suit the content
- Allow the user to accomplish tasks
Actions should not:
- Be ambiguous
- Duplicate the default action (such as "Read" or "Open")
Specifications:
- Three actions per notification maximum
- Each action has an icon and a name
- Actions are visible for expanded notifications, but otherwise hidden
Notification with two actions