timroes / SwipeToDismissUndoList

An Android library to enable swipe to dismiss and undo functionality on ListViews.
250 stars 72 forks source link

Added option to not require touch before auto-dismiss is queued #23

Closed warbi closed 11 years ago

warbi commented 11 years ago

By default, the undo dialog will only dismiss once the user touches the screen. This is to allow the user to 'acknowledge' that the removal has been made and can be undone.

This change allows this functionality to be switched off through a public method when initialising SwipeToDismiss. Example usage:

ListView listView = // ... (findById or getListView) SwipeDismissList.OnDismissCallback callback = // .. see below UndoMode mode = // .. see below SwipeDismissList swipeList = new SwipeDismissList(listView, callback, mode); swipeList.setRequireTouchBeforeDismiss(false); // <-- NEW