title: getActionBar().setHomeAsUpIndicator() Breaking Navigation Drawer "Hamburger" Animation
body: <p>In my application, I'm using a Navigation Drawer. I have given each item in the Navigation Drawer a different Icon for opening the Nav Drawer. </p>
  
  <p>When I initially start the app, the drawer icon for the first fragment animates like normal. But when I click on another Nav Drawer Item, the animations break. </p>
  
  <p>In my MainActivity, I have this code for toggling the nav drawer:</p>
  
  <pre><code>    getActionBar().setDisplayHomeAsUpEnabled(true);
      getActionBar().setHomeButtonEnabled(true);
  
      mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
              R.drawable.ab_mytasks, R.string.drawer_open,
              R.string.drawer_close) {
          public void onDrawerClosed(View view) {
              getActionBar().setTitle(mTitle);
              invalidateOptionsMenu(); // creates call to
              // onPrepareOptionsMenu()
          }
  
          public void onDrawerOpened(View drawerView) {
              getActionBar().setTitle(mDrawerTitle);
              invalidateOptionsMenu(); // creates call to
              // onPrepareOptionsMenu()
          }
      };
      mDrawerLayout.setDrawerListener(mDrawerToggle);
      mDrawerToggle.syncState();
  </code></pre>
  
  <p>Then in each of my fragments, I have this code for setting the custom icon:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setHasOptionsMenu(true);
      final ActionBar actionBar = getActivity().getActionBar();
      actionBar.setDisplayShowTitleEnabled(false);
      actionBar.setHomeAsUpIndicator(R.drawable.ab_mytasks);
  
  }
  </code></pre>
  
  <p>I have tried putting in the same mDrawerToggle method as in my MainActivity into my fragments. But the app crashes when I use getActivity().invalidateOptionsMenu().</p>
  
  <p>Here is an image representation of my problem:</p>
  
  <pre><code>1 = Animation works as normal
  2 = Selected another fragment from Nav Drawer
  3 = Original Fragment icon animation is broken
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/0zKwN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0zKwN.png" alt="1 = Works as normal, 2=Selected another item, 3=Original Fragment broken"></a></p>