Code example for FragmentActivity

Methods: getActionBar

0
        } 
    } 
 
    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    private void enableUp() { 
        getActionBar().setDisplayHomeAsUpEnabled(true); 
    } 
 
    @Override 
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                finish(); 
        } 
        return super.onOptionsItemSelected(item);
    } 
 
}