title: Fragments are getting overlapped on back button
body: <p>I have created 3 Fragments namely (FragmentA, FragmentB, FragmentC) and one MainActivity.
  There is a button in each fragment which replaces itself with next Fragment till FragmentC.</p>
  
  <p>I am replacing FragmentA (with) FragmentB (then with) FragmentC.</p>
  
  <p>Transaction from FragmentA to FragmentB  uses below function</p>
  
  <pre><code>    @Override
      public void fragmentreplacewithbackstack(Fragment fragment, String tag) {
  
          FragmentManager fragmentManager=getSupportFragmentManager();
          FragmentTransaction fragmentTransaction=fragmentManager.beginTransaction();
          fragmentTransaction.replace(R.id.contner,fragment , tag);
          fragmentTransaction.addToBackStack(null);
          fragmentTransaction.commit();   
  //      fragmentManager.executePendingTransactions();
  
      }
  </code></pre>
  
  <p>Transaction from FragmentB to FragmentC uses below function</p>
  
  <pre><code>public void fragmentreplace(Fragment fragment,String tag){
          FragmentManager fragmentManager=getSupportFragmentManager();
          FragmentTransaction fragmentTransaction=fragmentManager.beginTransaction();
          fragmentTransaction.replace(R.id.contner,fragment , tag);
          fragmentTransaction.commit();   
  
      }
  </code></pre>
  
  <p>problem is when i press back button from FragmentC, FragmentC and FragmentA overlap with each other.</p>
  
  <p><img src="https://i.stack.imgur.com/dq4oa.png" alt="As below screen"></p>