title: How to add click on the action bar back button
body: <p>I am trying to add click functionality on the <code>Actionbar</code> back button. I have tried the below things till now, but unable to get the desired result.</p>
  
  <pre><code>getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  </code></pre>
  
  <p>Observed that the onClick method is not being called when i click  on the back button in the action bar</p>
  
  <pre><code>    toggle = new ActionBarDrawerToggle(
              this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close) {
      };
  
      drawer.setDrawerListener(toggle);
      drawer.post(new Runnable() {
          @Override
          public void run() {
              toggle.syncState();
          }
      });
      toggle.setDrawerIndicatorEnabled(true);
  
      toggle.setToolbarNavigationClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              onKeyDown(4, null);
          }
      });
  </code></pre>