更新时间:2023-12-03 21:22:34
重命名你的ListView像这样的ID,
Rename the id of your ListView like this,
<ListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
由于您使用的 ListActivity
XML文件必须指定关键字的机器人的同时提一个ID。
Since you are using ListActivity
your xml file must specify the keyword android while mentioning to a ID.
如果您需要自定义的ListView
则 ListActivity
,你要简单地扩展了活动
,应该有相同的ID不包含此关键字的机器人的。
If you need a custom ListView
then instead of Extending a ListActivity
, you have to simply extend an Activity
and should have the same id without the keyword android.