How to swap two image views using drag and drop in Android?
问题 I've been trying to implement a very simple drag and drop in Android, where the dragged item swaps positions with the item it was dropped on. I've successfully implemented the onLongClick and onDrag listeners. When I drag and drop an item it replaces the item it was dropped on, but I can't figure out how make the replaced item take the place of the dragged item. I spent a while searching for answers, but most answers just linked complex implementations of drag and drop involving many files