added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0-beta01

GuidedActionDiffCallback

public class GuidedActionDiffCallback
extends DiffCallback<GuidedAction>

java.lang.Object
   ↳ androidx.leanback.widget.DiffCallback<androidx.leanback.widget.GuidedAction>
     ↳ androidx.leanback.widget.GuidedActionDiffCallback


DiffCallback used for GuidedActions, see GuidedStepSupportFragment.setActionsDiffCallback(DiffCallback).

Summary

Public constructors

GuidedActionDiffCallback()

Public methods

boolean areContentsTheSame(GuidedAction oldItem, GuidedAction newItem)

Called to decide whether two items have the same data.

boolean areItemsTheSame(GuidedAction oldItem, GuidedAction newItem)

Called to decide whether two objects represent the same item.

static GuidedActionDiffCallback getInstance()

Returns the singleton GuidedActionDiffCallback.

Inherited methods

Public constructors

GuidedActionDiffCallback

added in version 1.0.0
public GuidedActionDiffCallback ()

Public methods

areContentsTheSame

added in version 1.0.0
public boolean areContentsTheSame (GuidedAction oldItem, 
                GuidedAction newItem)

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 version 1.0.0
public boolean areItemsTheSame (GuidedAction oldItem, 
                GuidedAction newItem)

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.

getInstance

added in version 1.0.0
public static GuidedActionDiffCallback getInstance ()

Returns the singleton GuidedActionDiffCallback.

Returns
GuidedActionDiffCallback The singleton GuidedActionDiffCallback.