title: Android fragments - replace is adding a fragment
body: <p>I'm having a weird problem, and not sure why. I have a main activity with 2 fragments that split the screen. The left fragment will be static, but the right side needs to change layouts based on user actions.</p>
  
  <p>I'm using REPLACE, but it's creating a new fragment right under fragment2 (right side) and then that is the one that seems to change.</p>
  
  <p>I'm wondering if it's because in my Main activity I'm using <code>setContentView(R.layout.main);</code>
  where the <code>Main.xml</code> is laying out Fragment1 and Fragment2?</p>
  
  <p>So my question is: should I be adding my fragments programmatically instead of relying on the base layout? </p>
  
  <p>I really would like to see an example of the best way to do what I'm trying to do.  All of the <code>ListFragment</code> examples I'm seeing online is not really doing what I need, because when you click on an item in the list, the other fragment is just displaying different content with the same layout.</p>