When selecting text in an android text view, a contextual action bar comes up with options to copy, cut, select all, share, etc. Is there a way to capture the onClicks of these options and override them?
2
votes
1 Answers
0
votes
Try creating your own custom ActionMode.Callback for the text view. In the ActionMode.Callback you can create your own menu in which you can remove/change the options. You can also control the behavior with a
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {}
method override. see http://developer.android.com/guide/topics/ui/menus.html#CAB and Contextual Action Bar text selection for more information. Hope this helps!