title: How to set a default fragment in Android Studio Navigation Drawer?
body: <p>I'm looking for a way to se a default fragment in my navigation drawer which is not the item # 0. I've seen some solutions based on checking if savedInstanceState is null or not but I feel like I don't have access to this in my onNavigationDrawerItemSelected method. Here is my class:</p>
  
  <pre><code>public class Main extends ActionBarActivity
      implements NavigationDrawerFragment.NavigationDrawerCallbacks {
  
  /**
   * Fragment managing the behaviors, interactions and presentation of the navigation drawer.
   */
  private NavigationDrawerFragment mNavigationDrawerFragment;
  
  /**
   * Used to store the last screen title. For use in {@link #restoreActionBar()}.
   */
  private CharSequence mTitle;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      mNavigationDrawerFragment = (NavigationDrawerFragment)
              getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
      mTitle = getTitle();
  
      // Set up the drawer.
      mNavigationDrawerFragment.setUp(
              R.id.navigation_drawer,
              (DrawerLayout) findViewById(R.id.drawer_layout));
  }
  
  @Override
  public void onNavigationDrawerItemSelected(int position) {
      // update the Main content by replacing fragments
      Fragment fragment = null;
      switch (position) {
          case 0:
              fragment = new HomeFragment();
              break;
          case 1:
              fragment = new HomeFragment();
              break;
          case 2:
              fragment = new HomeFragment();
              break;
          default:
              fragment = new DiscoverFragment();
      }
  
  
      if (fragment != null) {
          FragmentManager fragmentManager = getSupportFragmentManager();
          fragmentManager.beginTransaction()
                  .replace(R.id.container, fragment).commit();
  
      }
  
  }
  </code></pre>