title: Hide navigation drawer when user presses back button
body: <p>I've followed Google's official developer tutorials <a href="http://developer.android.com/training/implementing-navigation/nav-drawer.html#Init">here</a> to create a navigation drawer. </p>
  
  <p>At the moment, everything works fine, except for when the user uses the native back button Android provides at the bottom of the screen (along with the home and recent app buttons). If the user navigates back using this native back button, the navigation drawer will still be open. If the user instead navigates back using the ActionBar, the navigation drawer will be closed like I want it to be. </p>
  
  <p>My code is nearly identical to the official tutorials, except for how I handle the user selecting an item on the drawer:</p>
  
  <pre><code>   mDrawerList.setOnItemClickListener(new ListView.OnItemClickListener()
      {
          @Override
          public void onItemClick(AdapterView parent, View view, int position, long id)
          {
              switch(position)
              {
                  case 0:
                  {
                      Intent intent = new Intent(MainActivity.this, NextActivity.class);
                      startActivity(intent);
                  }
              }
          }
      });
  </code></pre>
  
  <p>How can I have the navigation drawer be closed when the user navigates back using the native back button? Any advice appreciated. Thanks!</p>