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
I want it customise like this
how can i achieve this
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
I want it customise like this
how can i achieve this
I have create notification usingby following http://developer.android.com/wear/notifications/creating.html
Add code for create notification.
That's called Expanded layouts which is available right from Jelly Bean version.
There are 2 views of Notifications:
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].
In your case, you just want to display big picture in notification, give Notification.BigPictureStyle a try:
you can use NotificationCompat that need remoteview . below i set my custom layout named
activity_downlaodactivity
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.
Normal View Like
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 calledNotification.Style
.Big View Like
Go to this link expandable-notifications-android
More information on official docs