我试图做的是在ImageButton
按下“ibItem1”时打开“项目”。但是,设置后:
ibItem1.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
Intent items = new Intent("android.intent.action.ITEMS");
startActivity(items);
}
});
单击按钮不会执行任何操作。我在清单中设置了所有活动:
<activity
android:name="com.example.custombuilds.Items"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.ITEMS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
ActivityNotFoundException
尽管我在清单中声明了它,但该程序之前因为 a 而崩溃过。