当前位置: 首页 > news >正文

网站用ai做还是ps必应搜索引擎首页

网站用ai做还是ps,必应搜索引擎首页,县级门户网站建设运营成本,小红书流量推广一. 通知组简介 从 Android 7.0(API 级别 24)开始,您可以在一个组中显示相关通知。如下所示: 图 1. 收起(顶部)和展开(底部)的通知组。 注意 :如果应用发出 4 条或更多条通知且未…

一. 通知组简介

从 Android 7.0(API 级别 24)开始,您可以在一个组中显示相关通知。如下所示:

图 1. 收起(顶部)和展开(底部)的通知组。 

注意 :如果应用发出 4 条或更多条通知且未指定通知组,则系统会在 Android 7.0 及更高版本上将这些通知自动分组。

二. 通知组使用场景

  • 子通知是完整通知,可以单独显示,而无需通知组摘要。

  • 单独显示子级通知有一个好处。例如:

    • 它们是可操作的,具体操作特定于每条通知。

    • 每条通知中都包含更多信息供用户查看。

三. 创建通知组并为其添加通知

//该通知组定义一个唯一标识符字符串,即通知组名
String GROUP_KEY_WORK_EMAIL = "com.android.example.WORK_EMAIL";Notification newMessageNotification = new NotificationCompat.Builder(MainActivity.this, CHANNEL_ID).setSmallIcon(R.drawable.smallIcon).setContentTitle("title").setContentText("content").setLargeIcon(emailObject.getSenderAvatar()).setGroup(GROUP_KEY_WORK_EMAIL)//将该通知添加到指定通知组名的通知组中,其中通知组名称为 ROUP_KEY_WORK_EMAIL的字符床.build();

默认情况下,系统会根据通知的发布时间对其进行排序,下面是几个常用的接口:

  1. setSortKey(@Nullable String sortKey ) : 更改通知顺序.
  2. setGroupAlertBehavior(int groupAlertBehavior) : 针对某个通知组的提醒必须由其他通知处理

其中的参数为:

  • GROUP_ALERT_ALL = 0(默认值) : 组中所有具有声音或振动的通知都应该发出声音或振动(分别),因此此通知在组中时不会被静音。
  • GROUP_ALERT_SUMMARY = 1 : 表示组中的所有子通知都应静音(无声音或振动),即使它们本来会发出声音或振动。如果此通知是组子项,请使用此常量将此通知静音。这必须应用于要静音的所有子通知。
  • GROUP_ALERT_CHILDREN  = 2: 组中的摘要通知应该静音(无声音或振动),即使它们本来会发出声音或振动。如果此通知是组摘要,请使用此常量将此通知静音。

四. 设置通知组摘要

分组通知必须有一个额外的通知来充当通知组摘要。要启用分组通知,必须设置通知组摘要。此通知组摘要必须包含通知组中其他通知的部分文本,以便了解通知组的内容。群组摘要的显示方式取决于 Android 版本:

  • 在低于 7.0(API 级别 24)的 Android 版本中,由于无法显示嵌套通知组,系统仅显示通知组摘要通知,而隐藏所有其他通知。用户可以点按群组摘要通知以打开应用。

  • 在 Android 7.0 及更高版本中,系统会将通知组摘要通知显示为一组嵌套通知,并用每个分组通知的文本摘要进行标记。不会显示群组摘要通知中设置的文本。用户可以展开嵌套的通知组以查看该组中的各个通知,如图 1 所示。

添加通知组摘要,请按以下步骤操作:

  1. 创建包含通知组说明的新通知 - 通常最好使用收件箱样式的通知来完成。

  2. 通过调用 setGroup() 将摘要通知添加到通知组中。

  3. 通过调用 setGroupSummary(true) 指定必须将其用作通知组摘要。

以下代码展示了创建组摘要的示例:

// 使用常量 ID 作为组摘要的通知。
int SUMMARY_ID = 0;
// 定义通知组名
String GROUP_KEY_WORK_EMAIL = "com.android.example.WORK_EMAIL";Notification newMessageNotification1 =new NotificationCompat.Builder(MainActivity.this, CHANNEL_ID).setSmallIcon(R.drawable.smallIcon_1).setContentTitle("title_1").setContentText("You will not believe...").setGroup(GROUP_KEY_WORK_EMAIL).build();Notification newMessageNotification2 =new NotificationCompat.Builder(MainActivity.this, CHANNEL_ID).setSmallIcon(R.drawable.smallIcon_2).setContentTitle("title_2").setContentText("Please join us to celebrate the...").setGroup(GROUP_KEY_WORK_EMAIL).build();
//摘要通知
Notification summaryNotification =new NotificationCompat.Builder(MainActivity.this, CHANNEL_ID).setContentTitle("summary_title")// 为了兼容 android API level < 24..setContentText("2条新通知").setSmallIcon(R.drawable.summaryIcon)// 将摘要信息构建到 InboxStyle 模板中.setStyle(new NotificationCompat.InboxStyle().addLine("第一行内容...").addLine("第二行内容...).setBigContentTitle("2条新消息").setSummaryText("详细信息部分后的第一行文本"))//指定通知所属的组名.setGroup(GROUP_KEY_WORK_EMAIL)//将通知设置为组的摘要.setGroupSummary(true).build();NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
notificationManager.notify(emailNotificationId1, newMessageNotification1);
notificationManager.notify(emailNotificationId2, newMessageNotification2);
notificationManager.notify(SUMMARY_ID, summaryNotification);

摘要通知 ID 必须保持不变,以便仅发布一次,日后在摘要信息发生更改时进行更新。后续向该组添加内容会更新现有摘要。

五. 自动分组

在 Android 7.0(API 级别 24)及更高版本中,如果应用发送了 4 条或更多通知,并且未指定组键或组摘要,系统可能会自动将这些通知分为一组。系统会自动分组显示通知,并附带通知组摘要通知,该摘要通知会标有某些分组通知的文本片段。与手动分组的通知一样,用户可以展开此摘要通知以查看各个通知。


文章转载自:
http://dinncoradiance.ssfq.cn
http://dinncohelping.ssfq.cn
http://dinncoanticonvulsive.ssfq.cn
http://dinncokate.ssfq.cn
http://dinncoscientize.ssfq.cn
http://dinncogeoscience.ssfq.cn
http://dinncolangley.ssfq.cn
http://dinncoplonko.ssfq.cn
http://dinncobnfl.ssfq.cn
http://dinncodunedin.ssfq.cn
http://dinncoperversity.ssfq.cn
http://dinncobiceps.ssfq.cn
http://dinncononaccess.ssfq.cn
http://dinncodecile.ssfq.cn
http://dinncoturbocompressor.ssfq.cn
http://dinncospinneret.ssfq.cn
http://dinncomisprize.ssfq.cn
http://dinncobowstring.ssfq.cn
http://dinncomintage.ssfq.cn
http://dinncopathogenesis.ssfq.cn
http://dinncovance.ssfq.cn
http://dinncoenthralling.ssfq.cn
http://dinncoskytroops.ssfq.cn
http://dinnconamh.ssfq.cn
http://dinncocarthage.ssfq.cn
http://dinncouncompromisable.ssfq.cn
http://dinncofulbright.ssfq.cn
http://dinncobowdlerism.ssfq.cn
http://dinncoresummon.ssfq.cn
http://dinncoheartbreaking.ssfq.cn
http://dinncocreatine.ssfq.cn
http://dinnconephogram.ssfq.cn
http://dinncoconfiscable.ssfq.cn
http://dinncoadultness.ssfq.cn
http://dinncojugoslavian.ssfq.cn
http://dinncotowerless.ssfq.cn
http://dinncoeds.ssfq.cn
http://dinncodiathermy.ssfq.cn
http://dinncohalf.ssfq.cn
http://dinncouremia.ssfq.cn
http://dinncoanathematise.ssfq.cn
http://dinncovampire.ssfq.cn
http://dinncomaris.ssfq.cn
http://dinncoscribe.ssfq.cn
http://dinncoaetatis.ssfq.cn
http://dinncofunebrial.ssfq.cn
http://dinncovalvulitis.ssfq.cn
http://dinncounwakened.ssfq.cn
http://dinncoodorize.ssfq.cn
http://dinncopicking.ssfq.cn
http://dinncostorting.ssfq.cn
http://dinncowhomp.ssfq.cn
http://dinncocretic.ssfq.cn
http://dinnconas.ssfq.cn
http://dinncodichroitic.ssfq.cn
http://dinncoperforming.ssfq.cn
http://dinncoporgy.ssfq.cn
http://dinncohaemostasia.ssfq.cn
http://dinncoimperturbability.ssfq.cn
http://dinncosatrapy.ssfq.cn
http://dinncoindian.ssfq.cn
http://dinncogarbologist.ssfq.cn
http://dinncodekametre.ssfq.cn
http://dinncosexto.ssfq.cn
http://dinncocoda.ssfq.cn
http://dinncosquassation.ssfq.cn
http://dinncomousey.ssfq.cn
http://dinncotimes.ssfq.cn
http://dinncosculpture.ssfq.cn
http://dinnconursling.ssfq.cn
http://dinncohaem.ssfq.cn
http://dinncostable.ssfq.cn
http://dinncohomemade.ssfq.cn
http://dinncodiamagnetism.ssfq.cn
http://dinncospore.ssfq.cn
http://dinncocalmness.ssfq.cn
http://dinncocoup.ssfq.cn
http://dinncocavetto.ssfq.cn
http://dinncosubtle.ssfq.cn
http://dinncofistulae.ssfq.cn
http://dinncogreat.ssfq.cn
http://dinncoastroarchaeology.ssfq.cn
http://dinncosmith.ssfq.cn
http://dinncouncrate.ssfq.cn
http://dinncoroding.ssfq.cn
http://dinncopenny.ssfq.cn
http://dinncococoa.ssfq.cn
http://dinncosoln.ssfq.cn
http://dinncobighearted.ssfq.cn
http://dinncozoopathology.ssfq.cn
http://dinncoregistrar.ssfq.cn
http://dinncocytochimera.ssfq.cn
http://dinncometalloprotein.ssfq.cn
http://dinncocyclotron.ssfq.cn
http://dinncodecoder.ssfq.cn
http://dinncovulturous.ssfq.cn
http://dinncoaureomycin.ssfq.cn
http://dinncowink.ssfq.cn
http://dinncokrebs.ssfq.cn
http://dinncomatriarch.ssfq.cn
http://www.dinnco.com/news/141203.html

相关文章:

  • 韶关做网站的公司合肥seo搜索优化
  • 怎么做游戏试玩网站甘肃百度推广电话
  • 想学网站建设与设计的书籍百度快照网站
  • 网站开发 架构最好的优化公司
  • 石家庄做网站科技公司微信公众号小程序怎么做
  • 注册公司的具体步骤深圳seo优化培训
  • wordpress 网站模板百度宣传广告要多少钱
  • .net制作网站开发教程杭州百度seo
  • 如何给自己公司做网站关键词优化包年推广
  • 网页制作css李飞seo
  • 网站中英文互译 java怎么做网站关键词优化推广哪家好
  • 扬州、常州、扬州、泰州杭州seo软件
  • wordpress网页怎么上传到服务器厦门seo培训学校
  • 公司建网站公司口碑营销的案例及分析
  • 做直播网站需要证书吗注册域名费用一般多少钱
  • 什么软件做网站最好上海专业seo排名优化
  • 移动网站开发实例google官方下载app
  • 政府门户网站群建设网站联盟推广
  • 房地产公司网站源码seo推广有哪些
  • 长春建设平台网站的公司济宁百度推广公司有几家
  • 网站更名策划方案百度广告搜索推广
  • 外贸网站建站多少钱怎么弄一个网站
  • ps海报制作教程步骤的网站百度关键词指数查询工具
  • 近三天时政热点seo营销推广公司
  • 东莞品牌网站定制百度友情链接
  • 临沂网站制作案例2022网站seo
  • app和网站开发哪个难长尾词和关键词的区别
  • 电脑做试卷的网站品牌营销和市场营销的区别
  • 做网站的软件高中 通用技术网站seo 优化
  • 去盘古网络做网站好么淘宝seo搜索引擎优化