Clear and Recreate Fragment view in Android
<p>I have created the custom list view with search option for the list. Once user enter text into the search text box I have clear the custom list view and shown the filtered list item.It's working properly. I have added the fragments for the custom list view.After this implementation if I clear the list item and trying to show the filtered items at that time application shows the following exceptions:</p>

<blockquote>
  <p>11-22 12:21:21.110: WARN/System.err(1317): android.view.InflateException: Binary XML file line #13: Error inflating class fragment</p>
  
  <p>11-22 12:21:21.110: WARN/System.err(1317): Caused by: java.lang.IllegalArgumentException: Binary XML file line #13: Duplicate id 0x7f0600b8, tag null, or parent id 0x0 with another fragment for com.IM.NoteOpenFragment</p>
</blockquote>

<p>I had used following fragment view</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout1" android:layout_height="match_parent"
android:layout_width="wrap_content" android:orientation="vertical"&gt;
&lt;LinearLayout android:id="@+id/linearLayout2"
    android:layout_height="match_parent" android:layout_width="match_parent"
    android:orientation="vertical"&gt;
    &lt;TextView android:text="Landscape" android:id="@+id/textView1"
        android:layout_width="fill_parent" android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
    &lt;LinearLayout android:orientation="horizontal"
        android:layout_width="match_parent" android:layout_height="match_parent"
        android:id="@+id/frags"&gt;


        &lt;ListView android:id="@+id/number_list"
            android:layout_weight="2" android:layout_width="0px"
            android:layout_height="match_parent" /&gt;
        &lt;fragment class="com.example.fragmenttest.TestFragment"
            android:layout_weight="2" android:id="@+id/the_frag"
            android:layout_width="0px" android:layout_height="match_parent" /&gt;
    &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p></p>

<p>How to solve this?
Thanks in advance !</p>
