请在下面找到具有存档和回复选项的 android gmail 通知屏幕。在按下回复而不是打开 gmail 应用程序时,edittext 应显示在通知区域中,该区域将接受回复文本消息,并且回复消息应从通知本身发送。我们怎样才能做到这一点?根据下面的链接,我们可以显示归档和回复按钮的设置操作。 http://developer.android.com/training/notify-user/expanded.html
// Sets up the archive and reply action buttons that will appear in the
// big view of the notification.
Intent archiveIntent = new Intent(this, ResultActivity.class);
archiveIntent.setAction(CommonConstants.ACTION_ARCHIVE);
PendingIntent piArchive = PendingIntent.getService(this, 0, archiveIntent, 0);
Intent replyIntent = new Intent(this, ResultActivity.class);
replyIntent.setAction(CommonConstants.ACTION_REPLY);
PendingIntent piReply = PendingIntent.getService(this, 0, replyIntent, 0);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_stat_notification)
.setContentTitle(getString(R.string.notification)) .setContentText(getString(R.string.ping))
.setDefaults(Notification.DEFAULT_ALL)
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(msg))
.addAction (R.drawable.ic_stat_archive,getString(R.string.archive), piArchive)
.addAction (R.drawable.ic_stat_reply,getString(R.string.reply), piReply);
在按下回复按钮而不是转到 gmail 应用程序/打开整页 ResultActivity 时,它应该在通知区域本身显示指定高度、宽度和一个回复按钮的编辑文本。如何做到这一点?请建议可以遵循哪种方法来实现这一目标。提前致谢。