areItemsTheSame

abstract fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean(source)

Called by the DiffUtil to decide whether two object represent the same Item.

For example, if your items have unique ids, this method should check their id equality.

Return

True if the two items represent the same object or false if they are different.

Parameters

oldItemPosition

The position of the item in the old list

newItemPosition

The position of the item in the new list