CollectionDiffCallback

class CollectionDiffCallback<T>(    previousData: List<T>?,     nextData: List<T>?,     sameItemComparator: (previousItem: T, nextItem: T) -> Boolean? = null,     sameContentComparator: (previousItem: T, nextItem: T) -> Boolean? = null) : DiffUtil.Callback

A DiffUtil.Callback that compares two lists of items and returns whether two items are the same.

Constructors

Link copied to clipboard
constructor(    previousData: List<T>?,     nextData: List<T>?,     sameItemComparator: (previousItem: T, nextItem: T) -> Boolean? = null,     sameContentComparator: (previousItem: T, nextItem: T) -> Boolean? = null)

Functions

Link copied to clipboard
open override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean
Link copied to clipboard
open override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean
Link copied to clipboard
open fun getChangePayload(p0: Int, p1: Int): Any?
Link copied to clipboard
open override fun getNewListSize(): Int
Link copied to clipboard
open override fun getOldListSize(): Int