romannurik/Android-SwipeToDismiss — pull request #19 by nktrk (2014-06-25 23:01:47+00:00)
Title: Add callback aboutToDismiss in SwipeDismissListViewTouchListener

With a more elaborate adapter, for instance one that's touching a database (in my case the ObjectCursorAdapter), I noticed that the swipe to dismiss behavior was very jumpy and would flash the dismissed item briefly before removing it from the list.

Also, when I accessed the last item in the list object in onDismiss with adapter.getItem(position), I would receive null, stopping me from updating that object.

Adding a hook to alter objects before the dismiss occurs allowed me to update the object at that position and made the remove item much smoother (no flash of dismissed item).

It's only two lines of code, updated the docs and confirmed working in your sample app.