I have an app which gets data from a url and then puts it into a listview. I want to do this from two urls so i have two fragments and two xml files in which this happens. But i get the error
Your content must have a ListView whose id attribute is 'android.R.id.list'
I have the id set to list in my xml file, but wont there be a problem when there are two xml files? I cant have the same id right?
My xml files:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ListFragment">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/list"/>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<Framelayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".DetailsFragment">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/list"/>
</Framelayout>