I have customised the selection menu for an EDITTEXT element in an activity which displays a form to replace COPY, PASTE etc with actions that automatically copy and paste selected text to defined EDITTEXT elements. It's based on this solution which uses
setCustomSelectionActionModeCallback(new ActionMode.Callback()...
onPrepareActionMode(ActionMode mode, Menu menu)
This works well in portrait mode, however in landscape mode, a full-screen soft keyboard is displayed (with a NEXT / DONE button) which seems to override my custom menu with the default options COPY/PASTE etc.