android ics 自定义notification背景问题
来源:互联网 发布:ie10修复软件 编辑:程序博客网 时间:2024/05/28 15:08
android自定义notification时在ICS版本会出现背景灰白的问题,见图:
跟其他通知不一致。
解决方法:
可以在AndroidManifest.xml文件里加上
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
见红色部分,这样系统会根据版本对notification进行调整。
有可能出现的问题是某个页面onBackPressed()不会调用,back键无反应,遇到这种情况可以重载
onKeyDown(int keyCode, KeyEvent event)。
比如这样:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
//your code
}
}
return super.onKeyDown(keyCode, event);
}
修改完targetSdkVersion为14后,效果如下:
背景已经统一了。
- android ics 自定义notification背景问题
- Android 自定义通知Notification 适配不同背景颜色
- Android 自定义通知Notification 适配不同背景颜色
- Android ListView 自定义背景滚动变黑问题
- Android自定义Notification
- Android自定义Notification
- Android自定义Notification布局
- Android自定义Notification
- Android 自定义的notification
- android自定义Notification
- Android-自定义Notification
- Android自定义Notification
- Android自定义Notification
- android notification 自定义声音
- Android-自定义Notification
- android自定义的notification
- android 自定义NotifiCation
- #Android 自定义之Notification
- makefile详解 使用变量 十七
- SCP不需要输入密码的sh脚本
- makefile详解 变量高级用法 追加变量值 override 十八
- makefile详解 多行变量 环境变量 目标变量 模式变量 十九
- Word 文档结构图乱掉 问题 解决
- android ics 自定义notification背景问题
- wpa_cli用法
- CISCO模拟器dynagen的自定义拓扑和配置
- agree 的用法
- 利用MySQL的mysqlhotcopy实现数据库自动备份的SH脚本源码
- java经典小函数、细节积累
- web自动化测试的调研工作
- PHP Redis类操作
- 你让一些人为你工作了七天,你要用一根金条作为报酬。金条被分成七小块,每天给出一块。 如果你只能将金条切割两次,你怎样分给这些工人?