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

效果图网站排行建一个企业网站多少钱

效果图网站排行,建一个企业网站多少钱,微网站开发商,搜一下百度【使用notificationManager实现通知栏功能】 【普通通知、长文本通知、多行通知、图片通知】 import notificationManager from ohos.notificationManager import image from ohos.multimedia.image Entry Component struct Index {State message: string Hello World// 将图…

【使用notificationManager实现通知栏功能】

【普通通知、长文本通知、多行通知、图片通知】

import notificationManager from '@ohos.notificationManager'
import image from '@ohos.multimedia.image'
@Entry
@Component
struct Index {@State message: string = 'Hello World'// 将图片转换为PixelMap对象imagePixelMap: PixelMap=undefinedasync aboutToAppear(){//   获取资源管理器let rm=getContext(this).resourceManager// 读取图片let file=await rm.getMediaContent($r('app.media.app_icon'))//   创建PixelMapimage.createImageSource(file.buffer).createPixelMap().then(value=>{this.imagePixelMap=value})}build() {Row() {Column() {// 普通通知Text('发布普通通知1').fontSize(50).fontWeight(FontWeight.Bold).onClick(()=>{let notificationRequest: notificationManager.NotificationRequest={id:1,content:{contentType:notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,normal:{title:'普通通知标题1',text:'普通通知内容',additionalText:'附加内容'}}}notificationManager.publish(notificationRequest)})Text('发布普通通知2').fontSize(50).fontWeight(FontWeight.Bold).onClick(()=>{let notificationRequest: notificationManager.NotificationRequest={id:2,content:{contentType:notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,normal:{title:'普通通知标题2',text:'普通通知内容2',additionalText:'附加内容'}}}notificationManager.publish(notificationRequest)})Text('取消普通通知').onClick(()=>{notificationManager.cancel(1)})Text('取消全部通知').onClick(()=>{notificationManager.cancelAll()})// 长文本通知Text('发布长文本通知').onClick(()=>{let notificationRequest: notificationManager.NotificationRequest={id:3,content:{contentType:notificationManager.ContentType.NOTIFICATION_CONTENT_LONG_TEXT,longText:{title:'长文本通知标题',text:'长文本内容',additionalText:'附加内容',expandedTitle:'展开后标题',briefText: 'text_long',longText:'展开后内容(凑内容:sdwdwiifjewifjwiejfiwjfiwejfiwejfwefjwiejwgwg)'}}}notificationManager.publish(notificationRequest)})// 多行通知Text('发布多行通知').onClick(()=>{let notificationRequest: notificationManager.NotificationRequest={id:4,content:{contentType:notificationManager.ContentType.NOTIFICATION_CONTENT_MULTILINE,multiLine:{title:'多行通知标题',text:'多行通知内容',additionalText:'附加',briefText:'text_mul',longTitle:'展开标题',lines:['第一行','第二行','第三行','第四行']}}}notificationManager.publish(notificationRequest)})// 图片类型通知(图片内容为PixelMap型对象,大小不超过2M)Text('图片通知').onClick(()=>{let notificationRequest:notificationManager.NotificationRequest={id:5,content:{contentType:notificationManager.ContentType.NOTIFICATION_CONTENT_PICTURE,picture:{title:'图片通知标题',text:'图片通知内容',additionalText:'附加内容',expandedTitle:'展开图片标题',briefText:'text_picture',picture:this.imagePixelMap}}}notificationManager.publish(notificationRequest)})}.width('100%')}.height('100%')}
}

运行效果图:

http://www.yayakq.cn/news/427118/

相关文章:

  • 在织梦网站做静态网页中国字体设计网官网
  • 射阳网站建设天天爱天天做网站
  • 惠州网站建设兼职制作软件平台要多少钱
  • 齐齐哈尔网站开发做网站的题目
  • asp网站生成网站建设哪个软件好
  • dede网站 index.php无法访问宝应县住房建设局网站
  • 做网站的叫什么微信公众号小程序怎么创建
  • 重庆网站建设eyoucwordpress 去掉顶部工具栏
  • delphi做网站开发易语言网站开发教程
  • 爱站seo工具公司概况介绍怎么写
  • 中山移动网站建设多少钱黑色时尚橱柜网站源码
  • 怎么做公司网站的手机客户端网站建设的步骤教程
  • html网站成品下载左右网站模版
  • 怎么做外贸个人网站网页设计参考图
  • 网站建设包含图文设计企业推广的主要目的是
  • 建立网站考虑的三大要素郑州市网站和公众号建设
  • 北京 公司网站制作优是是什么网站
  • 云砺信息科技做网站网站建设 信科网络
  • 宁夏电力建设工程公司门户网站wordpress 文章不显示没有图片
  • 做网站还需要续费怎么弄推广广告
  • 服务型网站有哪些网站地图灰色效果的怎么做的
  • 国内知名的网站建设企业网址提交百度收录
  • 深圳网站建设hi0755重庆免费公司建网站
  • 有了域名如何建网站做房产的网站
  • 360网站怎么做挣外快的正规平台
  • 怎么看网站用的什么后台上海优化排名网站
  • 学校的二级网站怎么建设xammp wordpress
  • 邯郸企业网站团队dw做网页教程
  • 贵州网站制作品牌公司重庆网络问政平台
  • 北京网站开发联系电话低价郑州网站建设