4

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.

enter image description here

user1534409
  • 325
  • 8
  • 21
  • 1
    You 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 Answers1

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.

Community
  • 1
  • 1
bonnyz
  • 13,458
  • 5
  • 46
  • 70