Code example for FragmentActivity

Methods: onBackPressed

0
 
    @Override 
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home: {
                onBackPressed(); 
                return true; 
            } 
        } 
        return false; 
    } 
}