recalculatePositionOfItemAt
This method can be used to recalculate the position of the item at the given index, without triggering an onChanged callback.
If you are editing objects in the list such that their position in the list may change but you don't want to trigger an onChange animation, you can use this method to re-position it. If the item changes position, SortedList will call onMoved without calling onChanged.
A sample usage may look like:
final int position = mSortedList.indexOf(item);
item.incrementPriority(); // assume items are sorted by priority
mSortedList.recalculatePositionOfItemAt(position);
Content copied to clipboard
Parameters
index
The current index of the Item whose position should be re-calculated.