Notification subtext album name (#672)
* Playlist already added song prevention & AndroidSlidingUpPanel repo Update * Adding album name next to the app name on the notificaiton card, to have a similar look as the spotify app * Code Refactor - Fixed code as requested
This commit is contained in:
parent
dc91897189
commit
60f5c72219
2 changed files with 3 additions and 2 deletions
|
|
@ -71,6 +71,7 @@ public class PlayingNotificationImpl extends PlayingNotification {
|
|||
|
||||
final Notification notification = new NotificationCompat.Builder(service, NOTIFICATION_CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setSubText(song.albumName)
|
||||
.setContentIntent(clickIntent)
|
||||
.setDeleteIntent(deleteIntent)
|
||||
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ public class PlayingNotificationImpl24 extends PlayingNotification {
|
|||
final Song song = service.getCurrentSong();
|
||||
|
||||
final boolean isPlaying = service.isPlaying();
|
||||
final String text = MusicUtil.getSongInfoString(song);
|
||||
|
||||
final int playButtonResId = isPlaying
|
||||
? R.drawable.ic_pause_white_24dp : R.drawable.ic_play_arrow_white_24dp;
|
||||
|
|
@ -81,11 +80,12 @@ public class PlayingNotificationImpl24 extends PlayingNotification {
|
|||
retrievePlaybackAction(ACTION_SKIP));
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(service, NOTIFICATION_CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setSubText(song.albumName)
|
||||
.setLargeIcon(bitmap)
|
||||
.setContentIntent(clickIntent)
|
||||
.setDeleteIntent(deleteIntent)
|
||||
.setContentTitle(song.title)
|
||||
.setContentText(text)
|
||||
.setContentText(song.artistName)
|
||||
.setOngoing(isPlaying)
|
||||
.setShowWhen(false)
|
||||
.addAction(previousAction)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue