我试图在通知窗口中显示不确定的进度条。但它没有显示。
这是我的代码
int id = 1;
NotificationManager mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Builder mBuilder = new NotificationCompat.Builder(
MenuActivity.this);
mBuilder.setContentTitle("My app")
.setContentText("Download in progress");
mBuilder.setProgress(0, 0, true);
// Issues the notification
mNotifyManager.notify(id, mBuilder.build());
我正在关注这个链接 Continuing Activity Indicator
谁能告诉我哪里出了问题?
最佳答案
解决了只需要加一个图标
.setSmallIcon(R.drawable.ic_notification);
关于android - 在通知中显示一个持续的进度条,android?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28693079/