title: Backstack with multiple Fragments per layout
body: <p>I want to create stack of multiple fragments included in linear layout.
  To put set of fragments to activty I use following code (R.id.content is LinearLayout):</p>
  
  <pre><code>private void pushToBackStack(final Fragment... fragments) {
      final FragmentManager fm = getSupportFragmentManager();
  
      final FragmentTransaction ft = fm.beginTransaction();
  
      for (int i = 0; i &lt; fragments.length; i++) {
  
          if (i == 0) {
              ft.replace(R.id.content, fragments[i]);
          } else {
              ft.add(R.id.content, fragments[i]);
          }
      }
      ft.addToBackStack(null);
      ft.commit();
  }
  </code></pre>
  
  <p>when i call </p>
  
  <pre><code>pushToBackStack(f1, f2);
  pushToBackStack(f3, f4);
  pushToBackStack(f5, f6);
  </code></pre>
  
  <p>there're f3,f5 and f6 visible on screen, and after pressing Back button f2,f3,f4 are displayed.</p>
  
  <p>Expected behaviour is f5,f6 -> Back -> f3,f4 -> Back-> f1, f2</p>