RecyclerReorderCursorAdapter support for ItemTouchHelper
Closed this issue · 0 comments
lupsaa commented
Right now the RecyclerReorderCursorAdapter only supports the built in ReorderDecoration. It would be nice to support the ItemTouchHelper way of dealing with RecyclerView's items but for this the reorderItems() method should call notifyItemMoved() instead of notifyDataSetChanged().
This change however breaks the ReorderDecoration implementation. A simple overridable method should suffice to let ItemTouchHelper implementation change this behaviour.
- I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
- RecyclerExt version:
2.0.0
- Device OS version:
6.0
- Devide Manufacturer:
Huawei
- Device Name:
Nexus 6P
Reproduction Steps
- Implement ItemTouchHelper with RecyclerReorderCursorAdapter
- Call reorderItem() on item move
Expected Result
The adapter should switch item positions smoothly.
Actual Result
The adapter has it's notifyDataSetChanged() method called and the reorder ends abruptly.