Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Custom Notification in android

I need to create a custom notification instead of the default notification in android. Current notification have a icon,heading and message like below image

enter image description here

I want it customise like this

enter image description here

how can i achieve this

like image 479
Renjith Krishnan Avatar asked Apr 16 '14 06:04

Renjith Krishnan


1 Answers

Notification views

Normal View - A notification in normal view appears in an area that’s up to 64 dp tall. Even if you create a notification with a big view style, it will appear in normal view until it’s expanded.

Content title
Large icon
Content text
Content info
Small icon
Notification time

Normal View Like enter image description here

Big View - A notification’s big view appears only when the notification is expanded, which happens when the notification is at the top of the notification drawer, or when the user expands the notification with a gesture. Expanded notifications were first introduced in Android 4.1 JellyBean [API 16]. Expandable notifications were designed to support rich notification style objects called Notification.Style.

Big View Like

enter image description here

Go to this link expandable-notifications-android

More information on official docs

like image 111
M D Avatar answered Nov 02 '22 23:11

M D