In my xml file I have below list view.
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/editText1"
android:layout_centerHorizontal="true"
android:layout_marginTop="14dp"
android:divider="@color/blue"
android:dividerHeight="2dip"
android:background="@drawable/list_divider"
>
</ListView>
And in my java class I try to access the view as follows
ListView myListView = (ListView) findViewById(R.id.list);
I get a error for this saying "list cannot be resolved or is not a field". But if I change the id as android:id="@+id/list"
How can I access the view by using the id this way android:id="@android:id/list"
.
Also whats the basic difference between two ways of defining ID. Thanks in advance