DiffUtilCallback

A DiffUtil.Callback for calculating the difference between two lists of ViewData.

This class is used to efficiently update a RecyclerView adapter when the underlying data changes.

Parameters

oldList

The old list of ViewData.

newList

The new list of ViewData.

Constructors

Link copied to clipboard
constructor(oldList: List<ViewData>, newList: List<ViewData>)

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 override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any?
Link copied to clipboard
open override fun getNewListSize(): Int
Link copied to clipboard
open override fun getOldListSize(): Int