Action Mode Button

I have an action mode when the user selects items on the ListView now that the user clicks the "Finish" button in the action mode, I want to take a specific action, I do it, and it works fine, now I want to maintain landscape orientation, so I have to maintain an action mode. the problem is that my action against the selected elements in

 onDestroyActionMode 

therefore, when the user has a select element and rotates the action mode called onDestroyActionMode , and I don’t want it when turning, how to configure the processed event handling of the button, so I do not relay to onDestroyActionMode

+4
source share
1 answer

I suggest you check these answers

Prevent Undo by clicking the back button

How to find out if the Finish button is clicked in ActionMode .

I ended up adding code for the Finish button to the onDestroyActionMode method (ActionMode mode) and disable the dispatchKeyEvent method (KeyEvent event) to catch the back button

+1
source

Source: https://habr.com/ru/post/1434354/


All Articles