Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
Android 0.0.0 Developer Preview
belongs to Maven artifact androidx.leanback:leanback:1.1.0-alpha01

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

public GuidedActionDiffCallback ()

Public methods

areContentsTheSame

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

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

public static GuidedActionDiffCallback getInstance ()

Returns the singleton GuidedActionDiffCallback.

Returns
GuidedActionDiffCallback The singleton GuidedActionDiffCallback.