Code example for ActionBar

Methods: setDisplayHomeAsUpEnabled, setDisplayShowTitleEnabled

0
    setTitle(null); 
    activityHelper.setupActionBar(null, Color.BLACK);
     
    if (UIUtils.isHoneycomb()) { 
      ActionBar actionBar = getActionBar();
      actionBar.setDisplayHomeAsUpEnabled(true);
      actionBar.setDisplayShowTitleEnabled(false);
    } 
  } 
   
  @Override 
  public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
          case android.R.id.home:
              Intent intent = new Intent(this, MainActivity.class);
              intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
              startActivity(intent);
              return true; 
          default: 
              return super.onOptionsItemSelected(item);
      }