47deg/android-swipelistview — pull request #62 by josomers (2013-08-06 15:43:29+00:00)
Title: fix for Issue #46

Fix for null pointer exception when trying to close the previous opened item, so only one item can be open at a time. This exception occurred when trying to open the last item in the listview.

Example code :

listView.setSwipeListViewListener(new BaseSwipeListViewListener() {
int lastKnownPosition = -1;

@Override
public void onOpened(int position, boolean toRight) {
if (position != lastKnownPosition) listView.closeAnimate(lastKnownPosition);
lastKnownPosition = position;
}

});