Android Preference 中intent action的使用及出现的问题
来源:互联网 发布:决战武林进阶数据弩炮 编辑:程序博客网 时间:2024/06/06 20:22
<?xml version="1.0" encoding="utf-8"?><PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <Preference android:key="progressBar" android:title="@string/progressBar"> <intent android:action="com.progress.views"/> </Preference></PreferenceScreen>
在上面的xml中,想通过intent action 来指定对应的activity。
在AndroidMainfest.xml中
<activity android:name=".progress.ProgressActivity"> <intent-filter> <action android:name="com.progress.views"/> </intent-filter> </activity>
运行后来时报错
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.progress.views }
后来发现必需添加
<intent-filter> <action android:name="com.progress.views"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter>
0 0
- Android Preference 中intent action的使用及出现的问题
- Android中Preference的使用
- Android中preference的使用
- Android中preference的使用
- Android中preference的使用
- Android中preference的使用
- Android中preference的使用
- android中Preference的使用
- Android中Preference的使用
- Android的设置界面及Preference使用
- Android的设置界面及Preference使用
- Android的设置界面及Preference使用
- Android的设置界面及Preference使用
- Android的设置界面及Preference使用
- Android的设置界面及Preference使用
- Android的设置界面及Preference使用
- Android的设置界面及Preference使用
- Android的设置界面及Preference使用
- PMI-ACP敏捷项目管理专题讲座(免费)
- PNG图片压缩对比分析
- 回调函数与静态函数与this指针
- android webview js 交互
- python的字符串函数
- Android Preference 中intent action的使用及出现的问题
- dsp 28377在线升级 实例总结
- Android学习博客和文章存档
- Makefile:3: *** missing separator. Stop.
- 原码、反码和补码的表示范围
- 枚举类和注解
- 图的拓扑排序
- 轮播图[左右旋转滚动],可配置是否自动轮播/半透明/居中放大等等,简单实用
- Android中的Loader