Code example for ActionBarActivity

Methods: onOptionsItemSelected

0
        switch (item.getItemId()) {
            case android.R.id.home:
                onBackPressed(); 
                return true; 
        } 
        return super.onOptionsItemSelected(item);
    } 
 
}