public abstract class

PreferenceManager.PreferenceComparisonCallback

extends java.lang.Object

 java.lang.Object

↳androidx.preference.PreferenceManager.PreferenceComparisonCallback

Subclasses:

PreferenceManager.SimplePreferenceComparisonCallback

Overview

Callback class to be used by the RecyclerView.Adapter associated with the PreferenceScreen, used to determine when two Preference objects are semantically and visually the same.

Summary

Constructors
publicPreferenceComparisonCallback()

Methods
public abstract booleanarePreferenceContentsTheSame(Preference p1, Preference p2)

Called to determine if two Preference objects will display the same data

public abstract booleanarePreferenceItemsTheSame(Preference p1, Preference p2)

Called to determine if two Preference objects represent the same item

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public PreferenceComparisonCallback()

Methods

public abstract boolean arePreferenceItemsTheSame(Preference p1, Preference p2)

Called to determine if two Preference objects represent the same item

Parameters:

p1: Preference object to compare
p2: Preference object to compare

Returns:

true if the objects represent the same item

public abstract boolean arePreferenceContentsTheSame(Preference p1, Preference p2)

Called to determine if two Preference objects will display the same data

Parameters:

p1: Preference object to compare
p2: Preference object to compare

Returns:

true if the objects are visually identical