I wonder if you can 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 .addAction
, it loads the content correctly.
Home
But when I add it, it displays the default Notification layout.
Home
Thank you very much in advance!