I am trying to set up a list view and when i run in the emulator i am getting an error ‘Your content must have a id attribute is android.R.id.list’.
Here is my xml for the file:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<!-- Main ListView
Always give id value as list(@android:id/list)
-->
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
When I check in the generated java files for R.id ‘list’ is not in there. Any ideas how to fix this?
Tnanks
Try this out.