title: Action Bar's onClick listener for the Home button
body: <p>How can I implement a custom <code>onClickListener</code> for the Home button of the Action Bar?</p>
  
  <p>I already did a <code>getSupportActionBar().setDisplayHomeAsUpEnabled(true);</code> and now I want to redirect the user to a certain activity in case the Home button is clicked.</p>
  
  <p>I tried with:</p>
  
  <pre><code>@Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch (item.getItemId()) {
          case android.R.id.home:
              item.setOnMenuItemClickListener(new OnMenuItemClickListener() {
                  public boolean onMenuItemClick(MenuItem item) {
                      Intent i = new Intent();
                      i.setClass(BestemmingActivity.this, StartActivity.class);
                      i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                      startActivity(i);
                      return true;
                  }
              });
          default:
              return super.onOptionsItemSelected(item);
          }
      }
  </code></pre>
  
  <p>but it never enters in the <code>onMenuItemClick</code>.</p>
  
  <p>Basically, it's done just like in <a href="http://developer.android.com/guide/topics/ui/actionbar.html#Up">this link</a> but still it doesn't enter in the listener.</p>