DiffCallback

public abstract class DiffCallback
extends Object

java.lang.Object
   ↳ androidx.leanback.widget.DiffCallback<Value>


Callback that informs ArrayObjectAdapter how to compute list updates when using DiffUtil in ArrayObjectAdapter.setItems(List, DiffCallback) method.

The ArrayObjectAdapter.setItems(List, DiffCallback) method will pass items from different lists to this callback in order to implement the DiffUtil.Callback it uses to compute differences between lists.

Summary

Public constructors

DiffCallback()

Public methods

abstract boolean areContentsTheSame(Value oldItem, Value newItem)

Called to decide whether two items have the same data.

abstract boolean areItemsTheSame(Value oldItem, Value newItem)

Called to decide whether two objects represent the same item.

Object getChangePayload(Value oldItem, Value newItem)

Called to get a change payload between an old and new version of an item.

Inherited methods

Public constructors

DiffCallback

public DiffCallback ()