Code example for ActionBar

Methods: setDisplayHomeAsUpEnabled

0
        registerForContextMenu(getListView()); 
 
        ActionBar actionBar = getActionBar();
        if (actionBar != null) {
            // android.R.id.home will be triggered in onOptionsItemSelected() 
            actionBar.setDisplayHomeAsUpEnabled(true);
        } 
    } 
 
    @Override 
    protected CursorAdapter newAdapter() {
        return new SimpleCursorAdapter(this, R.layout.sim_import_list_entry, mCursor,
                new String[] { "name" }, new int[] { android.R.id.text1 });
    } 
 
    @Override 
    protected Uri resolveIntent() {
        Intent intent = getIntent();
        intent.setData(Uri.parse("content://icc/adn"));
        if (Intent.ACTION_PICK.equals(intent.getAction())) {
Connect your IDE to all the code out there  Get Codota for Java