andriod Notification area/drawer
来源:互联网 发布:矩阵的长度 编辑:程序博客网 时间:2024/05/20 00:38
如果在开发中有消息在不需要用户马上处理,可以使用通知,显示在系统上方的状态栏,主要有两部分:
标题、图标、内容等。
与toast不一样的消息提醒,主要包括更新、短消息等。
eg:
NotificationManager manager=(NotificationManager )this.getSystemService(Content.NOTIFICATION_SERVICE); //
manager.notify(id,notification);//发送一个通知
manager.concel(id);//取消一个通知
=============小试牛刀================
NotificationCompat.Builder builder=New NotificationCompat.Builder (this)
.setSmallIcon(R.Dwrable.图标)
. .setContentTitle(“标题”)
.setContentText(“”内容)
.setTicker("内容来了。。。。") //状态栏中显示的内容
.setXXXX(shezhi qita 其他); //叠加闪烁 声音 震动等
Notification notification=builder.build();
manager.notify()1,notification;
阅读全文
0 0
- andriod Notification area/drawer
- Andriod Notification
- Andriod Notification的使用
- Notifications and the Notification Area
- how to show an envelope icon in the notification area?
- Area
- Area
- Area
- area
- Area
- Area
- Navigation Drawer
- Navigation Drawer
- Navigation Drawer
- nivagation drawer
- navigation drawer
- Blur-Drawer
- Drawer侧滑
- 创建maven项目,常见问题(Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart..)
- 多益视频面试
- 何为大端序,小端序?
- 201. Bitwise AND of Numbers Range
- Windows下Git多账号配置,同一电脑多个ssh-key的管理
- andriod Notification area/drawer
- MyBatis+MySQL 返回插入的主键ID
- 使用Dom4j
- keytool 用法总结
- 微信Speex语音音频解码
- servlet实例-登录跳转--参数传递-编码过滤器--权限过滤器
- 在 iPhone 上使用 Popover Segue
- maven 手动添加jar包到本地仓库
- 各路API