title: How do I properly add multiple fragments to a fragment transition?
body: <p>I recently asked a question about fragments <a href="http://stackoverflow.com/questions/12443312/listview-not-populating-or-webview-taking-up-entire-screen">here</a>:</p>
  <p>After a lot of messing around I found what the problem was, but after more fooling around, and research (in which correct code seemed identical to mine), i cant figure out what my problem is.</p>
  <p>After everything is created, I find that only the last fragment added to the transaction is visible. This is my code to add them:</p>
  <pre><code>FragmentManager manager = getFragmentManager();
  FragmentTransaction trans = manager.beginTransaction();
  UrlListFragment urlfragment = new UrlListFragment();
  MyWebFragment webfragment = new MyWebFragment();
  trans.add(R.id.fragment_container, urlfragment, &quot;my_url_fragment&quot;);
  trans.add(R.id.fragment_container, webfragment, &quot;my_web_fragment&quot;);
  trans.commit();
  </code></pre>
  <p>And this is my main xml:</p>
  <pre><code>&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:orientation=&quot;horizontal&quot;
      android:layout_width=&quot;fill_parent&quot;
      android:layout_height=&quot;fill_parent&quot;&gt;
      &lt;FrameLayout
          android:id=&quot;@+id/fragment_container&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot; &gt;
      &lt;/FrameLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  <p><strong>What am I doing wrong, or what can be done so both fragments are added correctly and can be seen correctly?</strong></p>