src/main/java/de/blau/android/easyedit/EasyEditActionModeCallback.java
// placed here for convenience, allows to avoid unnecessary methods in subclasses
placed here for convenience, allows to avoid unnecessary methods in subclasses
placed here for convenience allows to avoid unnecessary methods in subclasses
@Override
    public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
        menuUtil.reset();
        if (created) {
            created = false;
            return true;
        }
        /*
         * This is a hack around google not providing a way to handle clicking on the "done"/"close" button as it uses
         * reflection it is dependent on the code in the androidx libs. THis further cannot be called in
         * onCreateActionMode as the Views don't seem to have been inflated yet.
         */
        View close = getActionCloseView();
        if (close != null) {
            close.setOnClickListener(v -> onCloseClicked());
        }
        return false;
    }
@ Override public boolean onPrepareActionMode ( ActionMode mode , Menu menu ) { menuUtil . reset ( ) ; if ( created ) { created = false ; return true ; } /*
         * This is a hack around google not providing a way to handle clicking on the "done"/"close" button as it uses
         * reflection it is dependent on the code in the androidx libs. THis further cannot be called in
         * onCreateActionMode as the Views don't seem to have been inflated yet.
         */ View close = getActionCloseView ( ) ; if ( close != null ) { close . setOnClickListener ( v -> onCloseClicked ( ) ) ; } return false ; }
placed here for convenience, allows to avoid unnecessary methods in subclasses
placed here for convenience allows to avoid unnecessary methods in subclasses
// we should return true on the first invocation