title: Incoherent DrawerLayout behavior after rotation
body: <p>I have an activity with a <code>DrawerLayout</code> and a <code>ActionBarDrawerToggle</code> to handle a side menu.</p>
  
  <p>Now, I needed this activity to rotate only on tablets but not on phone, so I added <code>android:configChanges="orientation|..."</code> to my manifest for that activity, and reimplemented <code>onConfigurationChanged</code>. On phones, nothing is done and portrait is forced, while on tablets, the new orientation is set to <code>SCREEN_ORIENTATION_SENSOR</code> to let the device decide <em>and</em> I reload the layout with <code>setContentView()</code>.</p>
  
  <p>Since I've done that, my side menu won't open past the first rotation. I discovered that <code>onOptionsItemSelected</code> is still called: </p>
  
  <pre><code>public boolean onOptionsItemSelected(MenuItem item)
  {
      if (item.getItemId() == android.R.id.home) {
          if (mDrawerLayout.isDrawerVisible(GravityCompat.START)) {
              mDrawerLayout.closeDrawer(GravityCompat.START);
          }
          else {
              mDrawerLayout.openDrawer(GravityCompat.START);
          }
      }
      return true;
  }
  </code></pre>
  
  <p>but the test that check if the drawer is visible always returns true. </p>
  
  <p>Any idea on what could cause that? Did I forget to recreate or update something after the rotation in onConfigurationChanged?</p>
  
  <p><strong>Note</strong>: I also found out that if I don't recreate the layout (with <code>setContentView()</code>) the drawer works fine (but then I obviously lose the landscape layout and get the portrait layout somehow scaled)</p>