fragment mismatch data bind errorr
<p>I have 2 fragment on the screen both extends <code>ListView</code> ..I fill list through code in fragment1 but data get bind to fragment2 ..both fragments are declared in xml files. Thanks in advance</p>

<p>Below is the code for <strong>Fragment 1</strong>:</p>

<pre><code>public class Fragment1 extends ListFragment implements OnFragmentUiUpdate {
    OnFragmentSelectedListener mCallback;
    private final int fragId = 1;
    // The container Activity must implement this interface so the frag can
    // deliver messages
    ListView list;


    /*@Override public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      se generateFragmentView(0,
      getActivity()); // We need to use a different list item layout for
      devices older than Honeycomb int layout =
      android.R.layout.simple_list_item_1;Build.VERSION.SDK_INT &gt;=
      Build.VERSION_CODES.HONEYCOMB ?
      android.R.layout.simple_list_item_activated_1 :
      android.R.layout.simple_list_item_1;

      // Create an array adapter for the list view, using the Ipsum headlines
      array 
      int layout =
          android.R.layout.simple_list_item_1;Build.VERSION.SDK_INT &gt;=
          Build.VERSION_CODES.HONEYCOMB ?
          android.R.layout.simple_list_item_activated_1 :
          android.R.layout.simple_list_item_1;
      setListAdapter(new ArrayAdapter&lt;String&gt;(getActivity(), layout,
      Ipsum.Headlines)); }*/

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        // If activity recreated (such as from screen rotate), restore
        // the previous article selection set by onSaveInstanceState().
        // This is primarily necessary when in the two-pane layout.

        // Inflate the layout for this fragment
        View vi = inflater.inflate(R.layout.menu_1_list, container, false);

        return vi;
    }

    @Override
    public void onStart() {
        super.onStart();

        /*
         * // When in two-pane layout, set the listview to highlight the
         * selected list item // (We do this during onStart because at the point
         * the listview is available.) if
         * (getFragmentManager().findFragmentById(R.id.article_fragment) !=
         * null) { getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); }
         */
        generateFragmentView(0, getActivity());
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);

        // This makes sure that the container activity has implemented
        // the callback interface. If not, it throws an exception.
        try {
            mCallback = (OnFragmentSelectedListener) activity;
        } catch (ClassCastException e) {
            throw new ClassCastException(activity.toString()
                    + " must implement OnHeadlineSelectedListener");
        }
    }

    @Override
    public void onListItemClick(ListView listView, View view, int position,
            long id) {
        // Notify the parent activity of selected item
        mCallback.onFragmentSelected(listView, view, position, id, fragId);

        // Set the item as checked to be highlighted when in two-pane layout
        getListView().setItemChecked(position, true);
    }

    @Override
    public void generateFragmentView(int position, Activity mainScreen) {
        // TODO Auto-generated method stub

        DbAdapter dbAdapter = null;
        dbAdapter = new DbAdapter(mainScreen.getApplicationContext());
        List&lt;BindObject&gt; menu1 = null;
        dbAdapter.open();
        try {
            menu1 = (List&lt;BindObject&gt;) dbAdapter.selectAll(Menu1.class);
            System.out.println("menu");
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        dbAdapter.close();
        list = (ListView) mainScreen.findViewById(android.R.id.list);

        LazyAdapter adapter = new LazyAdapter(mainScreen, this,
                (List&lt;BindObject&gt;) menu1);
        list.setAdapter(adapter);
    }

    @Override
    public View updateFragmentView(int position, Activity activity,
            LayoutInflater inflater, List&lt;BindObject&gt; Data, View convertView,
            ViewGroup parent) {

        View vi = convertView;
        ViewHolder holder = null;
        if (convertView == null) {
            vi = inflater.inflate(R.layout.menu1_item, null);

            holder = new ViewHolder();

            holder.item = (TextView) vi.findViewById(R.id.item);

            vi.setTag(holder);
        } else
            holder = (ViewHolder) vi.getTag();

        Menu1 menu = (Menu1) Data.get(position);

        holder.item.setText(menu.getItem());

        return vi;

    }

    public static class ViewHolder {

        public TextView item;

    }

}
</code></pre>

<p>Below is the code for <strong>Fragment 2</strong>:</p>

<pre><code>public class Fragment1_1 extends ListFragment implements OnFragmentUiUpdate{
    OnFragmentSelectedListener mCallback;
    ListView   list;
    private final int fragId=2;
    // The container Activity must implement this interface so the frag can deliver messages


    /*@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // We need to use a different list item layout for devices older than Honeycomb
        int layout = android.R.layout.simple_list_item_1;Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.HONEYCOMB ?
                android.R.layout.simple_list_item_activated_1 : android.R.layout.simple_list_item_1;

        // Create an array adapter for the list view, using the Ipsum headlines array
        setListAdapter(new ArrayAdapter&lt;String&gt;(getActivity(), layout, Ipsum.Headlines));


    }*/

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, 
            Bundle savedInstanceState) {

        // If activity recreated (such as from screen rotate), restore
        // the previous article selection set by onSaveInstanceState().
        // This is primarily necessary when in the two-pane layout.

        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.menulist, container, false);
    }

    @Override
    public void onStart() {
        super.onStart();

        // When in two-pane layout, set the listview to highlight the selected list item
        // (We do this during onStart because at the point the listview is available.)
        if (getFragmentManager().findFragmentById(R.id.article_fragment) != null) {
            getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        }
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);

        // This makes sure that the container activity has implemented
        // the callback interface. If not, it throws an exception.
        try {
            mCallback = (OnFragmentSelectedListener) activity;
        } catch (ClassCastException e) {
            throw new ClassCastException(activity.toString()
                    + " must implement OnHeadlineSelectedListener");
        }
    }

    @Override
    public void onListItemClick(ListView l, View v, int position, long id) {

        // Notify the parent activity of selected item
        mCallback.onFragmentSelected(l, v, position, id,fragId);

        // Set the item as checked to be highlighted when in two-pane layout
        getListView().setItemChecked(position, true);
    }

    public void updateArticleView(int position) {
        TextView article = (TextView) getActivity().findViewById(R.id.article);
        article.setText(Ipsum.Articles[position]);
        //mCurrentPosition = position;
    }



    @Override
    public void generateFragmentView(int position, Activity mainScreen) {
        // TODO Auto-generated method stub
        //updateArticleView( position);

        list = (ListView) mainScreen.findViewById(android.R.id.list);


        LazyAdapter adapter = new LazyAdapter(mainScreen,this, (List&lt;BindObject&gt;) Util.generateData());
        list.setAdapter(adapter);
    }

    @Override
    public View updateFragmentView(int position, Activity activity,LayoutInflater inflater,List&lt;BindObject&gt; Data, View convertView, ViewGroup parent) {
        View vi = convertView;
        ViewHolder holder = null;
        if (convertView == null) {
            vi = inflater.inflate(R.layout.menu1_1_item, null);

            holder = new ViewHolder();

            holder.item = (TextView) vi.findViewById(R.id.item);
            holder.image = (ImageView) vi.findViewById(R.id.image);

            vi.setTag(holder);
        } else
            holder = (ViewHolder) vi.getTag();



        Menu1_1 menu = (Menu1_1) Data.get(position);

        holder.item.setText(menu.getItem());
        String imagString=activity.getPackageName()+":drawable/"+"ic_launcher";
        int res = activity.getResources().getIdentifier(imagString, null, null);
        holder.image.setImageResource(res);
        return vi;



    }
    public static class ViewHolder {

        public TextView item;
        public ImageView image;

    }

}
</code></pre>

<p>Code for <strong>main.xml</strong>:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#000000"
    android:orientation="horizontal" &gt;

    &lt;TableLayout
        android:id="@+id/tableLayout1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerInParent="true" &gt;
        &lt;TableRow
            android:id="@+id/tableRow1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" &gt;
        &lt;/TableRow&gt;
        &lt;TableRow
            android:id="@+id/tableRow1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" &gt;
            &lt;fragment
                android:id="@+id/Fragment1_1"
                android:name="com.example.android.fragments.Fragment1_1"
                android:layout_width="60dp"
                android:layout_height="100dp"
                android:layout_weight="0.25" /&gt;
            &lt;fragment
                android:id="@+id/Fragment1_1_1"
                android:name="com.example.android.fragments.Fragment1_1_1"
                android:layout_width="90dp"
                android:layout_height="100dp"
                android:layout_weight="0.75" /&gt;
        &lt;/TableRow&gt;
        &lt;TableRow
            android:id="@+id/tableRow1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" &gt;
        &lt;/TableRow&gt;
    &lt;/TableLayout&gt;

    &lt;SlidingDrawer
        android:id="@+id/SlidingDrawer"
        android:layout_width="wrap_content"
        android:layout_height="150dip"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:content="@+id/contentLayout"
        android:handle="@+id/slideButton"
        android:orientation="vertical"
        android:padding="10dip" &gt;
        &lt;Button
            android:id="@+id/slideButton"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:background="@drawable/ic_launcher" &gt;
        &lt;/Button&gt;

        &lt;TableLayout
            android:id="@+id/contentLayout"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" &gt;
            &lt;TableRow
                android:id="@+id/tableRow4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:gravity="center_vertical" &gt;
                &lt;ImageButton
                    android:id="@+id/feature"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    android:layout_weight="0.2"
                    android:background="@drawable/ic_launcher"
                    android:onClick="displayFeature" /&gt;
                &lt;ImageButton
                    android:id="@+id/feature"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    android:layout_weight="0.2"
                    android:background="@drawable/ic_launcher"
                    android:onClick="displayFeature" /&gt;
                &lt;ImageButton
                    android:id="@+id/feature"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    android:layout_weight="0.2"
                    android:background="@drawable/ic_launcher"
                    android:onClick="displayFeature" /&gt;
                &lt;ImageButton
                    android:id="@+id/feature"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    android:layout_weight="0.2"
                    android:background="@drawable/ic_launcher"
                    android:onClick="displayFeature" /&gt;
                &lt;ImageButton
                    android:id="@+id/feature"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    android:layout_weight="0.2"
                    android:background="@drawable/ic_launcher"
                    android:onClick="displayFeature" /&gt;
                &lt;ImageButton
                    android:id="@+id/feature"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    android:layout_weight="0.2"
                    android:background="@drawable/ic_launcher"
                    android:onClick="displayFeature" /&gt;

                &lt;TableLayout
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" &gt;
                    &lt;TableRow
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content" &gt;
                        &lt;ImageButton
                            android:id="@+id/googlebtn"
                            android:layout_width="50dp"
                            android:layout_height="50dp"
                            android:layout_weight="0.2"
                            android:background="@drawable/ic_launcher"
                            android:onClick="displayFeature" /&gt;
                        &lt;ImageButton
                            android:id="@+id/tweeterBtn"
                            android:layout_width="50dp"
                            android:layout_height="50dp"
                            android:layout_weight="0.2"
                            android:background="@drawable/ic_launcher"
                            android:onClick="displayFeature" /&gt;
                    &lt;/TableRow&gt;
                    &lt;TableRow
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content" &gt;
                        &lt;ImageButton
                            android:id="@+id/fb"
                            android:layout_width="50dp"
                            android:layout_height="50dp"
                            android:layout_weight="0.2"
                            android:background="@drawable/ic_launcher"
                            android:onClick="displayFeature" /&gt;
                        &lt;ImageButton
                            android:id="@+id/fb2"
                            android:layout_width="50dp"
                            android:layout_height="50dp"
                            android:layout_weight="0.2"
                            android:background="@drawable/ic_launcher"
                            android:onClick="displayFeature" /&gt;
                    &lt;/TableRow&gt;
                &lt;/TableLayout&gt;
            &lt;/TableRow&gt;
        &lt;/TableLayout&gt;
    &lt;/SlidingDrawer&gt;

    &lt;fragment
        android:id="@+id/Fragment1"
        android:name="com.example.android.fragments.Fragment1"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/tableLayout1"
        android:layout_marginTop="106dp"
        android:tag="feature" /&gt;

    &lt;ImageButton
        android:id="@+id/menu1Btn"
        android:layout_width="20dp"
        android:layout_height="20dp"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/Fragment1"
        android:background="@drawable/ic_launcher"
        android:onClick="displayFeature" /&gt;

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

<hr>

<p>Fragment1 data gets binds with fragent2 ...while debugging ..fragment1 code runs properly but generatefragnentView() function data goes to fragment2  and fragment1 shows blank</p>
