GuidedActionDiffCallback


class GuidedActionDiffCallback : DiffCallback


DiffCallback used for GuidedActions, see setActionsDiffCallback.

Summary

Public constructors

Public functions

Boolean

Called to decide whether two items have the same data.

Boolean

Called to decide whether two objects represent the same item.

java-static GuidedActionDiffCallback

Returns the singleton GuidedActionDiffCallback.

Inherited functions

From androidx.leanback.widget.DiffCallback
Any?
getChangePayload(oldItem: Value, newItem: Value)

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

Public constructors

GuidedActionDiffCallback

Added in 1.1.0
GuidedActionDiffCallback()

Public functions

areContentsTheSame

Added in 1.1.0
fun areContentsTheSame(oldItem: GuidedAction, newItem: GuidedAction): Boolean

Called to decide whether two items have the same data. This information is used to detect if the contents of an item have changed.

Parameters
oldItem: GuidedAction

The item in the old list.

newItem: GuidedAction

The item in the new list.

Returns
Boolean

True if the contents of the items are the same or false if they are different.

areItemsTheSame

Added in 1.1.0
fun areItemsTheSame(oldItem: GuidedAction, newItem: GuidedAction): Boolean

Called to decide whether two objects represent the same item.

Parameters
oldItem: GuidedAction

The item in the old list.

newItem: GuidedAction

The item in the new list.

Returns
Boolean

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

See also
areItemsTheSame

getInstance

Added in 1.1.0
java-static fun getInstance(): GuidedActionDiffCallback

Returns the singleton GuidedActionDiffCallback.

Returns
GuidedActionDiffCallback

The singleton GuidedActionDiffCallback.