Duplicate ID with Fragment on PagerAdapter page
i´m facing a problem with the pageradapter and fragments.

i have a PagerAdapter and on every page i want to put a fragment. on the xml layout of the page, i use this code to add the fragment:

    <fragment android:id="@+id/fragment1"
        android:name="de.worldcup.android.ui.fragments.GroupTableFragment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

when i run the application, it crashes when it tries to instanciate the second page of the PagerAdapter (2nd time the instantiateItem method is called) at the line, when i try to  inflate the xml layout of the page.

    View v = inflater.inflate(R.layout.group_activity_item, null);

the error:

    03-15 21:57:34.795: E/AndroidRuntime(6257): Caused by: java.lang.IllegalArgumentException: Binary XML file line #20: Duplicate id 0x7f050043, tag null, or parent id 0x0 with another fragment for de.worldcup.android.ui.fragments.GroupTableFragment

i looked up the id 0x7f050043 -> it is the @+id/fragment1 id.

any ideas how to fix this?

thanks :)
Duplicate ID with Fragment on PagerAdapter page
===

i´m facing a problem with the pageradapter and fragments.

i have a PagerAdapter and on every page i want to put a fragment. on the xml layout of the page, i use this code to add the fragment:

    <fragment android:id="@+id/fragment1"
        android:name="de.worldcup.android.ui.fragments.GroupTableFragment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

when i run the application, it crashes when it tries to instanciate the second page of the PagerAdapter (2nd time the instantiateItem method is called) at the line, when i try to  inflate the xml layout of the page.

    View v = inflater.inflate(R.layout.group_activity_item, null);

the error:

    03-15 21:57:34.795: E/AndroidRuntime(6257): Caused by: java.lang.IllegalArgumentException: Binary XML file line #20: Duplicate id 0x7f050043, tag null, or parent id 0x0 with another fragment for de.worldcup.android.ui.fragments.GroupTableFragment

i looked up the id 0x7f050043 -> it is the @+id/fragment1 id.

any ideas how to fix this?

thanks :)