We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
不知道为何,这个bug一直没人提,原因出在这里: Collections.swap(data, fromPosition, toPosition); // 这里是交换 fromPosition 的数据跟 toPosition数据进行交换 adapter.notifyItemMoved(fromPosition, toPosition); // 这里是将fromPosition 的移动到 toPosition
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 当fromPosition跟toPosition是临近的则没有问题,如9移动到8,正常;但当9直接移动到7就错了,展示的数据是[0, 1, 2, 3, 4, 5, 6, 9, 7, 8],而如果直接使用Collections.swap,则实际数据是 [0, 1, 2, 3, 4, 5, 6, 9, 8, 7],就会导致不一致,所有这里使用Collections.swap有问题
The text was updated successfully, but these errors were encountered:
No branches or pull requests
不知道为何,这个bug一直没人提,原因出在这里:
Collections.swap(data, fromPosition, toPosition); // 这里是交换 fromPosition 的数据跟 toPosition数据进行交换
adapter.notifyItemMoved(fromPosition, toPosition); // 这里是将fromPosition 的移动到 toPosition
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
当fromPosition跟toPosition是临近的则没有问题,如9移动到8,正常;但当9直接移动到7就错了,展示的数据是[0, 1, 2, 3, 4, 5, 6, 9, 7, 8],而如果直接使用Collections.swap,则实际数据是 [0, 1, 2, 3, 4, 5, 6, 9, 8, 7],就会导致不一致,所有这里使用Collections.swap有问题
The text was updated successfully, but these errors were encountered: