added in version 25.1.0
belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1

PreferenceManager.PreferenceComparisonCallback

public static abstract class PreferenceManager.PreferenceComparisonCallback
extends Object

java.lang.Object
   ↳ android.support.v7.preference.PreferenceManager.PreferenceComparisonCallback
Known Direct Subclasses


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

Public constructors

PreferenceManager.PreferenceComparisonCallback()

Public methods

abstract boolean arePreferenceContentsTheSame(Preference p1, Preference p2)

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

abstract boolean arePreferenceItemsTheSame(Preference p1, Preference p2)

Called to determine if two Preference objects represent the same item

Inherited methods

From class java.lang.Object

Public constructors

PreferenceManager.PreferenceComparisonCallback

added in version 25.1.0
PreferenceManager.PreferenceComparisonCallback ()

Public methods

arePreferenceContentsTheSame

added in version 25.1.0
boolean arePreferenceContentsTheSame (Preference p1, 
                Preference p2)

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

Parameters
p1 Preference: Preference object to compare

p2 Preference: Preference object to compare

Returns
boolean true if the objects are visually identical

arePreferenceItemsTheSame

added in version 25.1.0
boolean arePreferenceItemsTheSame (Preference p1, 
                Preference p2)

Called to determine if two Preference objects represent the same item

Parameters
p1 Preference: Preference object to compare

p2 Preference: Preference object to compare

Returns
boolean true if the objects represent the same item