Adding Vertical Dividers Between Transport Elements of Notification

111 views Asked by At

I am trying to find our a way to add vertical dividers to the transport elements of media player on my big notification. Here is my code for the notification:

NotificationCompat.Builder notificationBuilder = (NotificationCompat.Builder) new NotificationCompat.Builder(this)
.setShowWhen(false)
.setStyle(new NotificationCompat.MediaStyle()
.setMediaSession(mMediaSession.getSessionToken())
.setShowActionsInCompactView(0, 1, 2))
.setColor(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary))
.setLargeIcon(Cover)
.setSmallIcon(android.R.drawable.stat_sys_headset)
.setContentTitle(Artist)
.setContentText(Title)
.setContentInfo(Album);
.addAction(android.R.drawable.ic_media_previous, "previous", playbackAction(3))
.addAction(notificationAction, "pause", play_pauseAction)
.addAction(android.R.drawable.ic_media_next, "next", playbackAction(2));

I want to be able to do the following:

  1. Add horizontal dividers between the transport elements (next, play, and prev).
  2. Change the size of the text in Content.

Please point me in the right direction to what I need to do. I have thought about making a custom resource and placing the divider on the resource image giving the illusion that is a divider. I have tried looking and found stuff to try and format notification and I have tried it without luck. It did not work at all.

Regards.

1

There are 1 answers

0
Jack On BEST ANSWER

After hours of searching, I have found out that this can only accomplished by means of custom layout. It is not simple, though.