Search code examples
androidandroid-actionbarandroid-support-librarycontextual-action-baractionmode

Contextual action mode on top of action bar


Recently I switched to the v7 Support Library to integrate Material Design elements.

Since then, my contextual action mode is displayed on top of my action bar instead of replacing it (like in another activity of my app).

  • actionMode on top of actionBar actionMode on top of actionBar
  • actionMode overlaying actionBar actionMode overlaying actionBar

I can't figure out why this is happening, because the code for starting and preparing the ActionMode are nearly the same in both activities. I always start them with startActionMode(actionModeCallback); and then inflate the menu.

If you need code samples, feel free to ask. Any help would be appreciated.


Solution

  • Solved it myself: I didn't use the ActionMode version from the support library.