title: Navigating to previous fragment without reloading it
body: <p>I am creating an app in which I'm using fragments. I want to go back to the previous fragment from another fragment without reloading the previous fragment.</p>
  
  <p>Code for going to the next fragment:</p>
  
  <pre><code>Fragment newFragment;
  android.support.v4.app.FragmentManager manager = ((AppCompatActivity) context).getSupportFragmentManager();
  FragmentTransaction transaction = manager.beginTransaction();
  newFragment = new Inner_details();
  transaction.replace(R.id.content_data, newFragment);
  
  transaction.addToBackStack("fragment6");
  
  transaction.commit();
  </code></pre>
  
  <p>Code for going to the previous fragment</p>
  
  <pre><code>FragmentManager fm = getActivity().getSupportFragmentManager();
  
  fm.popBackStack ("fragment6", FragmentManager.POP_BACK_STACK_INCLUSIVE);
  </code></pre>