library / com.camerash.filterdrawer / FilterRecyclerViewDiffCallback

FilterRecyclerViewDiffCallback

class FilterRecyclerViewDiffCallback<Data : DiffItemCallback<Data>> : Callback

DiffUtil Callback used for calculating changes in FilterableRecyclerAdapter

Parameters

Data - Your custom data type that implements DiffItemCallback

oldDataList - The old list of data item

newDataList - The new list of data item

Author
Camerash

See Also

DiffUtil.Callback

DiffItemCallback

Constructors

<init>

FilterRecyclerViewDiffCallback(oldDataList: List<Data>, newDataList: List<Data>)

DiffUtil Callback used for calculating changes in FilterableRecyclerAdapter

Functions

areContentsTheSame

fun areContentsTheSame(oldItemPos: Int, newItemPos: Int): Boolean

Return whether two data items looks the same when shown to users

areItemsTheSame

fun areItemsTheSame(oldItemPos: Int, newItemPos: Int): Boolean

Return whether two data items are identical at a data level

getNewListSize

fun getNewListSize(): Int

Return the size of the new list of data item

getOldListSize

fun getOldListSize(): Int

Return the size of the old list of data item