Class BasicSelectionActionDelegate

Object
org.mozilla.geckoview.BasicSelectionActionDelegate
All Implemented Interfaces:
ActionMode.Callback, GeckoSession.SelectionActionDelegate

@UiThread public class BasicSelectionActionDelegate extends Object implements ActionMode.Callback, GeckoSession.SelectionActionDelegate
Class that implements a basic SelectionActionDelegate. This class is used by GeckoView by default if the consumer does not explicitly set a SelectionActionDelegate.

To provide custom actions, extend this class and override the following methods,

1) Override getAllActions() to include custom action IDs in the returned array. This array must include all actions, available or not, and must not change over the class lifetime.

2) Override isActionAvailable(java.lang.String) to return whether a custom action is currently available.

3) Override prepareAction(java.lang.String, android.view.MenuItem) to set custom title and/or icon for a custom action.

4) Override performAction(java.lang.String, android.view.MenuItem) to perform a custom action when used.