Before 4.2.2, only the logo was clickable.
As of 4.2.2, the title of the actionbar is clickable along with the logo - both as if part of the same button.
You can see an example of this behavior in the Google Reader app - if you have a 4.2.2 device (See screenshot attached).
How do I disable this behavior and enable clicking only on the icon? Perhaps it's a bug?
See example code snippet:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setHomeButtonEnabled(true);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
return true;
}
return false;
}
}