Java 将视图对象放入通知android中

Java 将视图对象放入通知android中,java,android,view,Java,Android,View,我试图在Android中的通知中放置一个视图对象(如TextView、Edittext、Button等)。我对这项任务还不熟悉,我很困惑,所以这里是我迄今为止的尝试 因此,我有一个通知,如下所示: Intent intent = new Intent(context, Receiver.class); PendingIntent pIntent = PendingIntent.getActivity(context, 0, intent, 0);

我试图在Android中的通知中放置一个视图对象(如TextView、Edittext、Button等)。我对这项任务还不熟悉,我很困惑,所以这里是我迄今为止的尝试

因此,我有一个通知,如下所示:

        Intent intent = new Intent(context, Receiver.class);
        PendingIntent pIntent = PendingIntent.getActivity(context, 0, intent, 0);

        Notification noti = new Notification.Builder(context)
        .setContentTitle("Message From")
        .setContentText("Subject").setSmallIcon(R.drawable.ic_launcher)
        .setContentIntent(pIntent)
        .addAction(R.drawable.ic_launcher, "", pIntent).build();

        NotificationManager notificationManager = 
                  (NotificationManager)   
                    context.getSystemService(context.NOTIFICATION_SERVICE);
        noti.flags |= Notification.FLAG_AUTO_CANCEL;

        notificationManager.notify(0, noti); 
我知道这可以做果冻豆和后版本。我想知道是否可以通过PendingEvent使用Intent插入视图对象

如果有人能给我指引正确的方向那就太好了看到这些了吗

定制通知布局对您有帮助吗?