title: Android ActionBar Up button won't open navigation drawer
body: <p>I've been trying to make my Navigation Drawer open using the ActionBarActivity's Up button for a few hours now, but I just can't seem to work it out.</p>
  
  <p>Right now, I can open it by swiping/sliding right and I can see the arrow Up/Back button in the ActionBar, but the Navigation Drawer won't open once I tap the button.</p>
  
  <p>Please note I'm using Support v7 <code>ActionBarDrawerToggle</code>.</p>
  
  <p>Here's my ActionBarActivity's <code>onCreate</code>:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      if (savedInstanceState == null) {
          getFragmentManager().beginTransaction()
                  .add(R.id.container, new HomeFragment())
                  .commit();
      }
  
      Log.d(TAG, "onCreate");
  
      getSupportActionBar().setDisplayHomeAsUpEnabled(true);
      getSupportActionBar().setHomeButtonEnabled(true);
      mDrawerLayout = (DrawerLayout) findViewById(R.id.main_drawer_layout);
      mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.drawer_open, R.string.drawer_close);
      mDrawerLayout.setDrawerListener(mDrawerToggle);
      mDrawerToggle.setDrawerIndicatorEnabled(true);
  }
  
  @Override
  protected void onPostCreate(Bundle savedInstanceState) {
      super.onPostCreate(savedInstanceState);
      Log.d(TAG, "onPostCreate");
      mDrawerToggle.syncState();
  }
  </code></pre>
  
  <p>Am I missing something? Perhaps there's a method call that links the ActionBar's Up/Back button to the DrawerToggle?</p>
  
  <p>Any help/guidance is very well appreciated.</p>
  
  <p><strong>Update</strong>: I also tried using <code>mDrawerToggle.syncState();</code> and nothing changed. Updated the onCreate method above to include the <code>syncState</code> call.</p>
  
  <p><strong>Update 2</strong>: I updated the code again to how it currently stands in my MainActivity file. I made a few changes as suggested but the drawer still won't open.</p>
  
  <p>I've tested this in two devices: in an HTC One m7 with Android 5.0.2 and Sense 6.5 and in an x86 AVD Emulator running Lollipop SDK 21.</p>