bauerca / drag-sort-listview

Android ListView with drag and drop reordering.
3.2k stars 1.44k forks source link

Prevent swapping of the last item #134

Closed Odaym closed 9 years ago

Odaym commented 9 years ago

I'm very desperate here after I've tried so much to prevent the very last item from swapping. I was able to successfully prevent that last item from being draggable by checking for its position in startDrag and not going through that code if the position is that of the item I want.

But I've had no luck when trying to get that same item to not be swappable with other items. I tried to do the same in doDragFloatView() (the 2 methods) to no avail.

Any help with this would be really appreciated!

Odaym commented 9 years ago

I've just solved this, add the view of the last item as the listview's footer. Got inspired by issue #63