Package 

Interface UndoHelper.OnActionListener

    • Method Summary

      Modifier and Type Method Description
      abstract void onActionCanceled(int action, List<Integer> positions) Called when Undo event is triggered.
      abstract void onActionConfirmed(int action, int event) Called when Undo timeout is over and action must be committed in the user Database.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onActionCanceled

         abstract void onActionCanceled(int action, List<Integer> positions)

        Called when Undo event is triggered. Perform custom action after restoration.

        Usually for a delete restoration you should call restoreDeletedItems.

        Parameters:
        action - one of REMOVE, UPDATE
        positions - positions affected
      • onActionConfirmed

         abstract void onActionConfirmed(int action, int event)

        Called when Undo timeout is over and action must be committed in the user Database.

        Due to Java Generic, it's too complicated and not well manageable if we pass the {@code List} object.So, to get deleted items, use getDeletedItems from theimplementation of this method.

        Parameters:
        action - one of REMOVE, UPDATE
        event - one of DISMISS_EVENT_SWIPE,DISMISS_EVENT_MANUAL,DISMISS_EVENT_TIMEOUT,DISMISS_EVENT_CONSECUTIVE