2
I wonder if it is possible to customize a Notification with your actions.
Example:
RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.customnotification);
Notification.Builder builder = new Notification.Builder(this)
.setSmallIcon(R.drawable.ic_ico)
.setAutoCancel(true)
.setContentIntent(pIntent)
.setContent(remoteViews)
.addAction(R.drawable.ic_sim, "Sim", intent)
.addAction(R.drawable.ic_nao, "Não", outraIntent);
When I remove the .addAction
, it correctly loads the content.
But when I include it, it displays the default Notification layout.
Thanks in advance!
It worked correctly ! Thank you very much!
– Thiago Luiz Domacoski