GuidedActionDiffCallback
public class GuidedActionDiffCallback extends DiffCallback
| java.lang.Object | ||
| ↳ | androidx.leanback.widget.DiffCallback | |
| ↳ | androidx.leanback.widget.GuidedActionDiffCallback |
DiffCallback used for GuidedActions, see setActionsDiffCallback.
Summary
Public constructors |
|---|
Public methods |
|
|---|---|
boolean |
areContentsTheSame(Called to decide whether two items have the same data. |
boolean |
areItemsTheSame(Called to decide whether two objects represent the same item. |
static @NonNull GuidedActionDiffCallback |
Returns the singleton GuidedActionDiffCallback. |
Inherited methods |
||
|---|---|---|
|
Public constructors
Public methods
areContentsTheSame
public boolean areContentsTheSame(
@NonNull GuidedAction oldItem,
@NonNull 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 | |
|---|---|
@NonNull GuidedAction oldItem |
The item in the old list. |
@NonNull GuidedAction newItem |
The item in the new list. |
| Returns | |
|---|---|
boolean |
True if the contents of the items are the same or false if they are different. |
| See also | |
|---|---|
areContentsTheSame |
areItemsTheSame
public boolean areItemsTheSame(
@NonNull GuidedAction oldItem,
@NonNull GuidedAction newItem
)
Called to decide whether two objects represent the same item.
| Parameters | |
|---|---|
@NonNull GuidedAction oldItem |
The item in the old list. |
@NonNull GuidedAction newItem |
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
public static @NonNull GuidedActionDiffCallback getInstance()
Returns the singleton GuidedActionDiffCallback.
| Returns | |
|---|---|
@NonNull GuidedActionDiffCallback |
The singleton GuidedActionDiffCallback. |