title: Fragment PopBackStack
body: <p>I am getting a strange problem, while using Fragments and popping back them out.</p>
  
  <p>I have one Fragment Activity:</p>
  
  <p>Step1: I am attaching one Fragment in the onCreate of that Activity in the Starting named Fragment A as:</p>
  
  <p><strong>This is the onCreate of Fragment Activity</strong></p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedBundleState) {
          super.onCreate(savedBundleState);
          setContentView(R.layout.activity_base_new);
  
          Fragement_Home home = new Fragement_Home();
          FragmentManager manager = getSupportFragmentManager();
          manager.beginTransaction().add(R.id.frameContent, home).addToBackStack("home").commit();
      }
  </code></pre>
  
  <p>Step:2 After that I attached replaced the Fragment with the following code:</p>
  
  <pre><code>Fragment_More moreFragment = new Fragment_More();
              FragmentManager manager = getSupportFragmentManager();
              manager.beginTransaction().replace(R.id.frameContent, moreFragment).addToBackStack("more").commit();
  </code></pre>
  
  <p>Step 3: After that again I added one more Fragment on Fragment_More in the same way:</p>
  
  <pre><code>Fragment_AboutRockstand termsConditions = new Fragment_AboutRockstand();
              getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.frameContent, termsConditions).addToBackStack("about_rockstand").commit();
  </code></pre>
  
  <p>and here is my Fragment's Activity onBackPressedButton Lisetener:</p>
  
  <pre><code>@Override
  public void onBackPressed() {
      FragmentManager fm = getSupportFragmentManager();
      Fragment f = fm.findFragmentById(R.id.frameContent);
  
   if(fm.getBackStackEntryCount() &gt; 1){
           fm.popBackStack();
      } else{
          finish();
      }
  }
  </code></pre>
  
  <p><strong>Here is the Problem which I am getting:</strong></p>
  
  <p>When I press back from Step 3, it gives me previous fragment successfully as described by onBackPressed, it will popbackstack and will take me to the previous Fragment. But from the Fragment_More, when I press back again, it shows me blank FRAGMENT content. It never shows the First Fragment which I had added on Step 1 in the OnCreate of the Activity.</p>
  
  <p>Please comment. What I am doing wrong ?</p>
  
  <p>Thanks</p>