In android developer's menu guide it is mentioned that:
The action mode is disabled and the contextual action bar disappears when the user deselects all items, presses the BACK button, or selects the Done action on the left side of the bar.
Technically, it means that mActionMode.finish()
, the BACK
button press, or the Done
action selection call ActionMode.Callback onDestroyActionMode()
method.
My question is how to perform a custom action (for example Toast("Action mode exit by Done select")
) when the user selects Done
, and another action (for ex. Toast("Action mode exit by BACK")
) when the user press BACK
?