JakeWharton/ActionBarSherlock — Issue #319: ActionMode creates duplicate/overlapping icons if a menu inflater is used
Author: guidedways
Created: 2012-02-29 10:22:18+00:00
State: open

In an ActionMode.Callback implementation, we did the following:

public boolean onCreateActionMode(ActionMode mode, Menu menu) {
getSupportMenuInflater().inflate(R.menu.action_mode_menu, menu);
return true;
}

The action mode comes and goes fine the first time. However the second time you can feel the animation is a bit gerky and the buttons are in fact 'overlapping' another set of similar buttons. To prove this, rotate the phone (and if you have onConfigChanges='orientation' it won't recreate your whole view) and you'll see 'two' sets of buttons appear in landscape. The first set is pushed to the left but the second set.

The problem goes away completely if you construct the menu manually by code.