title: Android - How to initialize sliding menu only once
body: <p>I am using this sliding menu in my project </p>
  
  <p><a href="https://github.com/jfeinstein10/SlidingMenu" rel="nofollow">https://github.com/jfeinstein10/SlidingMenu</a></p>
  
  <p>I am adding this menu to all of my activities. And this sliding menu is calling a Fragment at opening. How to prevent creating multiple fragments for each activity and call if Fragment is already created at back stack ?</p>
  
  <p>Each of my activities are extending my BaseActivity and i'm initialzing sliding menu like this at BaseActivity.</p>
  
  <pre><code>getSupportFragmentManager()
      .beginTransaction().replace(R.id.detail, new DetailFragment())
      .commit();
  </code></pre>
  
  <p>Thanks</p>