JakeWharton/ActionBarSherlock — Issue #356: Home button not clickable
Author: rock3r
Created: 2012-03-09 15:37:37+00:00
State: open

I'm using static attachment in an Activity, and I found that the Home button isn't clickable "out of the box". This behaviour was present in RC1 as well but I did not have time to report it, but now I updated to 4.0 final and I still see the same issue.

This is the code I have to use to initialize the ActionBar in onCreate:

private void initializeABS() {
mSherlock.requestFeature((int) com.actionbarsherlock.view.Window.FEATURE_INDETERMINATE_PROGRESS);
mSherlock.setContentView(R.layout.device_list);

// Workaround to get a clickable Home button
mSherlock.getActionBar().setDisplayShowHomeEnabled(true);
mSherlock.getActionBar().setDisplayHomeAsUpEnabled(true);
mSherlock.getActionBar().setDisplayHomeAsUpEnabled(false);

mSherlock.setProgressBarIndeterminate(true);
mSherlock.setProgressBarIndeterminateVisibility(false);

mSherlock.setTitle(R.string.select_device);

// This is a workaround for http://b.android.com/15340 from http://stackoverflow.com/a/5852198/132047
if (!ImSyncApplication.isICS()) {
BitmapDrawable bg = (BitmapDrawable) getResources().getDrawable(R.drawable.bg_striped);
bg.setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
mSherlock.getActionBar().setBackgroundDrawable(bg);
}
}

What am I missing? I kinda copy-pasted the ABS-related code from the demos...