Reputation: 1636
I am implementing custom push notifications. I have a custom layout, modified using RemoteViews. I have set color using
contentView.setInt(R.id.parentLayout, "setBackgroundColor", Color.parseColor("#4979C5"))
notifBuilder.setColor(Color.parseColor("#4979C5"))
.setColorized(true)
But it doesn't set color completely on background. I want it to have like this Android system notification
but I am getting this
Here is the styling that I have used:
notifBuilder.setColorized(true)
.setColor(Color.parseColor("#4979C5"))
.setStyle(NotificationCompat.DecoratedCustomViewStyle())
.setContent(closedView)
.setCustomBigContentView(contentView)
.setSmallIcon(R.drawable.icon_tick)
I have tried using other styles and also removed the style but I get this result
Which seems to be fine as it does have background color set on complete notification area but now there is no details like app name, notification time, app icon and expand icon. Even action buttons are gone.
Upvotes: 2
Views: 1129