安卓:集团在状态栏,但不通知名单的通知 [英] Android: Group notification in status bar but not in notifications list

查看:95
本文介绍了安卓:集团在状态栏,但不通知名单的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道是否有一种方法来群在状态栏中的通知,但没有通知列表?

我想只显示一个状态栏图标,但是当用户拖动下通知列表应该是不同的意图几份通知。

我的理解有才有可能任何一组两个通知在两地或创建多个通知,这将导致一些通知状态栏。 这样的话?

解决方案
  

由于我undestood有只可能任何一组在两地或同时通知创建几个   通知这将导致在状态栏的几个通知。这样的话?

是的,但你可以创建一个<复杂href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomExpandedView">custom <一href="http://developer.android.com/reference/android/app/Notification.html"><$c$c>Notification视图,只要你想,通过内容查看通知领域。这是一个<一个href="http://developer.android.com/reference/android/widget/RemoteViews.html"><$c$c>RemoteViews,更好地为您所使用的渲染主屏幕应用程序部件。因此,虽然只能在通知抽屉里,你一个条目,你可以把它会有几个按钮,每个发射一个单独的 PendingIntent

Does anyone know if there is a way to group a notification in the status bar but not in the list of notifications?

I want to show only one icon in the status bar but when the user drags down the "notifications list" it should be several notifications with different intents.

As I understood there is only possible to either group both notifications on both places or to create several notifications which will cause several notifications in the status bar. Is this the case?

解决方案

As I undestood there is only possible to either group both notifications on both places or to create several notifications which will cause several notifications in the status bar. Is this the case?

Yes, but you can create as complex of a custom Notification view as you want, via the contentView field on Notification. This is a RemoteViews, better known as the what you use for rendering a home screen app widget. So, while there can only be one entry in the notification drawer for you, you can have it have several buttons each firing a separate PendingIntent.

这篇关于安卓:集团在状态栏,但不通知名单的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆