title: How do I make my ActionBar DrawerToggle button work?
body: <p><a href="https://i.stack.imgur.com/tJmO4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tJmO4.png" alt="enter image description here"></a>    </p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
          mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,R.drawable.ic_launcher, R.string.drawer_open, R.string.drawer_close) {
              @Override
              public void onDrawerOpened(View drawerView) {
                  super.onDrawerOpened(drawerView);
  
                  invalidateOptionsMenu();
              }
  
              @Override
              public void onDrawerClosed(View drawerView) {
                  super.onDrawerClosed(drawerView);
                  Log.d(TAG, "onDrawerClosed: " + getTitle());
  
                  invalidateOptionsMenu();
              }
          };
  
          mDrawerLayout.setDrawerListener(mDrawerToggle);
      }
  </code></pre>
  
  <p>Here I used <code>DrawerToggle</code> and defined a function for it but it's not         working.</p>
  
  <p>What should I define in <code>invalidateOptionsMenu()</code> method?</p>