我想从默认的preferences.xml 开始一个活动,带有<intent> 标签。活动经过了很好的测试,问题不在于那个。(我在我的应用程序中扩展了 PreferenceActivity,所以preferences.xml 是“附带”的)请看代码,有什么问题?
首选项.xml:
....
<PreferenceCategory
android:title="@string/titleEtcSetup">
<PreferenceScreen
android:key="renameCourses"
android:title="@string/titleRenameCourses"
android:summary="@string/textRenameDisplayedCoursesNames">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="my.notifier.ui"
android:targetClass="my.notifier.ui.EditCoursesNamesActivity" />
</PreferenceScreen>
.....
</PreferenceCategory>
.....
清单.xml:
....
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.notifier.ui"....
....
<activity android:name=".EditCoursesNamesActivity" android:label="@string/titleRenameCourses">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
.....
当我按下“renameCourses 项目”时,Activity 没有调用,没有任何反应。LogCat 是“清晰的”,没有错误或警告。我搜索了很多,但没有找到解决方案,也许我只是错过了一些东西......请帮忙!