android学习--Notification
来源:互联网 发布:string转化为int数组 编辑:程序博客网 时间:2024/06/07 22:49
关于notification需要注意以下几点:
1) 2.3及其以下必须设置contentIntent
if (mContentIntent == null && Build.VERSION.SDK_INT <= 10) {
this.mBuilder.setContentIntent(PendingIntent.getActivity(context, 0, new Intent(), PendingIntent.FLAG_CANCEL_CURRENT));
}
2) 2.3及其以下版本中,自定义布局中的按钮,点击事件可能会失灵,所以必须隐藏按钮
// 2.3及其以下若要使用自定义布局,必须再次手动设置才起效
if (mContentView != null && Build.VERSION.SDK_INT <= 10) {
notification.contentView = mContentView;
}
3) 4.1及其以上才有 bigContentView
if (mBigContentView != null && Build.VERSION.SDK_INT >= 16) {
notification.bigContentView = mBigContentView;
}
0 0
- Android Notification学习--发出Notification
- Android学习之Notification
- android的Notification学习
- Android Services学习--Notification
- Android学习之 Notification
- Android Notification学习
- 学习Android Push Notification
- Android学习之Notification
- android的Notification学习
- Android学习:初识Notification
- android学习--Notification
- Android学习 - Notification详解
- Android Notification学习
- Android学习之Notification
- android学习笔记35:notification
- Android 学习记录 之 notification
- Android学习:Notification的使用
- Android 通知栏Notification学习
- HDU 1027--Ignatius and the Princess II【next_permutation】
- Technique Java. CountDownLatch
- ZOJ Friends(暴力)
- c#委托和事件(上)
- Fatal error: Can't use function return value in write context in ……
- android学习--Notification
- 黑马程序员—Java学习笔记之集合框架(二)
- NSURLCache
- c#委托和事件(下)
- static静态方法
- Hibernate核心接口
- Java笔记02-Java语法基础01
- C#类型
- 工作周报032