Skip to content

Commit

Permalink
Workaround for Android Issue 159527
Browse files Browse the repository at this point in the history
Method onPrepareActionMode of the ActionMode Callback is no longer called
after onCreateActionMode. For now, it will be called manually.
  • Loading branch information
anvo committed Dec 29, 2015
1 parent d878ac8 commit 6154e2d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ public PlayerListActionMode(Activity a, Game g, PlayerListAdapter p, int positio
public boolean onCreateActionMode(ActionMode mode, Menu menu)
{
mode.getMenuInflater().inflate(R.menu.list_players, menu);
// Workaround for Android Issue 159527
// https://code.google.com/p/android/issues/detail?id=159527
// Method onPrepareActionMode is no longer called after onCreateActionMode
// in Android > 5.0 and appcompat > v22.1
// For now, we will call it by hand
this.onPrepareActionMode(mode, menu);

return true;
}

Expand Down

0 comments on commit 6154e2d

Please sign in to comment.