Java android通知远程视图不显示

Java android通知远程视图不显示,java,android,Java,Android,我的密码在下面。执行代码时,将显示NotiAction,但不会显示远程视图 我的意思是我在NotiAction中看不到R.layout.layou\u update\u栏 mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); mNotification = new Notification(R.drawable.close_icon,"Pet Parrot", System.c

我的密码在下面。执行代码时,将显示NotiAction,但不会显示远程视图

我的意思是我在NotiAction中看不到R.layout.layou\u update\u栏

mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotification = new Notification(R.drawable.close_icon,"Pet Parrot", System.currentTimeMillis());
mNotification.defaults = 4;

mRemoteView = new RemoteViews(getPackageName(), R.layout.layout_update_bar);
mNotification.contentView = mRemoteView;
mNotification.contentView.setProgressBar(R.id.progress,100,44,false);
mNotification.contentView.setTextViewText(R.id.title, "Siddharth" + "2km -> 20km");
//mNotification.flags |= Notification.FLAG_AUTO_CANCEL;
CharSequence contentTitle = "download";
Intent notificationIntent = new Intent(this,PhotoSaSa.class);
PendingIntent contentIntent = PendingIntent
    .getActivity(this, 0, notificationIntent, 0);
mNotification.setLatestEventInfo(this, contentTitle,"", contentIntent);

mNotifyManager.notify(1, mNotification);

调用SetLateStevenInfo将覆盖自定义contentView。将其移动到第3行,或者更好地切换到api。

尝试在代码中设置notification.icon。仅设置notification.contentView无法在notification中看到它。

您的问题不清楚。