I have a horizontal recyclerview which implements ItemTouchHelper callback for dragging and reordering cells. When a cell is being moved i want to shrink all of the cells widths so they all appear on screen. In onItemSelected() i can successfully change the size of the cell currently being moved, and revert back in onItemClear.
However, i want to resize all cells and not just the current cell. What is the best approach for this?
I tried creating a function in my adapter class and calling it to resize via notifyDataSetChanged() however it was removing the current cell being moved.
Is there a way to do this as part of my ItemTouchHelperCallback - creating a similar function as onItemSelected but updating all other cells?