Hey I would like to create a custom notification I would like it to look like the sound cloud notification more specifically the x on the top right corner for closing also when I scroll from left to right I don't want the notification to be removed. Here is the image of sound cloud notification.
Asked
Active
Viewed 3,397 times
4
-
1You have to use RemoteViews and make Your own layout. Look here for example, it shows not what You want, but how to do....http://www.androidbegin.com/tutorial/android-custom-notification-tutorial/ – Opiatefuchs Feb 03 '15 at 14:30
1 Answers
0
I would like to create a custom notification I would like it to look like the sound cloud notification
In order to create a custom notification you just need to provide a custom XML layout to the Notification.Builder
(take a look here).
when I scroll from left to right I don't want the notification to be removed
To achieve this you just need to invoke startForeground
on your playback Service
by passing your custom notification. Here's an example.