I am using a RecyclerView with ListAdapter (which uses AsyncListDiffer to calculate and animate changes when list is replaced).
The problem is that if I
That function will not get called because ListAdapter won't consider it as another list, since it has all the same items only the order got changed.
@Override
public void submitList(@Nullable final List list) {
super.submitList(list != null ? new ArrayList<>(list) : null);
}
So to solve this, you need to call this function with null first, then immediately call with the order changed list.
submitList(null);
submitList(orderChangedList);