belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1
PreferenceManager.SimplePreferenceComparisonCallback
public
static
class
PreferenceManager.SimplePreferenceComparisonCallback
extends PreferenceManager.PreferenceComparisonCallback
java.lang.Object | ||
↳ | android.support.v7.preference.PreferenceManager.PreferenceComparisonCallback | |
↳ | android.support.v7.preference.PreferenceManager.SimplePreferenceComparisonCallback |
A basic implementation of PreferenceManager.PreferenceComparisonCallback
suitable for use with the
default Preference
classes. If the PreferenceScreen
contains custom
Preference
subclasses, you must override
arePreferenceContentsTheSame(Preference, Preference)
Summary
Public constructors | |
---|---|
PreferenceManager.SimplePreferenceComparisonCallback()
|
Public methods | |
---|---|
boolean
|
arePreferenceContentsTheSame(Preference p1, Preference p2)
Called to determine if two The result of this method is only valid for the default |
boolean
|
arePreferenceItemsTheSame(Preference p1, Preference p2)
Called to determine if two This method will not be able to track replaced |
Inherited methods | |
---|---|
From
class
android.support.v7.preference.PreferenceManager.PreferenceComparisonCallback
| |
From
class
java.lang.Object
|
Public constructors
PreferenceManager.SimplePreferenceComparisonCallback
PreferenceManager.SimplePreferenceComparisonCallback ()
Public methods
arePreferenceContentsTheSame
boolean arePreferenceContentsTheSame (Preference p1, Preference p2)
Called to determine if two Preference
objects will display the same data
The result of this method is only valid for the default Preference
objects,
and custom subclasses which do not override
onBindViewHolder(PreferenceViewHolder)
. This method also assumes
that if a preference object is being replaced by a new instance, the old instance was
not modified after being removed from its containing PreferenceGroup
.
Parameters | |
---|---|
p1 |
Preference : Preference object to compare |
p2 |
Preference : Preference object to compare |
Returns | |
---|---|
boolean |
true if the objects are visually identical
|
arePreferenceItemsTheSame
boolean arePreferenceItemsTheSame (Preference p1, Preference p2)
Called to determine if two Preference
objects represent the same item
This method will not be able to track replaced Preference
objects if they
do not have a unique key.
Parameters | |
---|---|
p1 |
Preference : Preference object to compare |
p2 |
Preference : Preference object to compare |
Returns | |
---|---|
boolean |
true if the objects represent the same item
|
See also:
Interfaces
- DialogPreference.TargetFragment
- Preference.OnPreferenceChangeListener
- Preference.OnPreferenceClickListener
- PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback
- PreferenceFragmentCompat.OnPreferenceStartFragmentCallback
- PreferenceFragmentCompat.OnPreferenceStartScreenCallback
- PreferenceGroup.PreferencePositionCallback
- PreferenceManager.OnDisplayPreferenceDialogListener
- PreferenceManager.OnNavigateToScreenListener
- PreferenceManager.OnPreferenceTreeClickListener
Classes
- CheckBoxPreference
- DialogPreference
- DropDownPreference
- EditTextPreference
- EditTextPreferenceDialogFragmentCompat
- ListPreference
- ListPreferenceDialogFragmentCompat
- MultiSelectListPreferenceDialogFragmentCompat
- Preference
- Preference.BaseSavedState
- PreferenceCategory
- PreferenceDataStore
- PreferenceDialogFragmentCompat
- PreferenceFragmentCompat
- PreferenceGroup
- PreferenceManager
- PreferenceManager.PreferenceComparisonCallback
- PreferenceManager.SimplePreferenceComparisonCallback
- PreferenceScreen
- PreferenceViewHolder
- R
- R.anim
- R.attr
- R.bool
- R.color
- R.dimen
- R.drawable
- R.id
- R.integer
- R.layout
- R.string
- R.style
- R.styleable
- SeekBarPreference
- SwitchPreferenceCompat
- TwoStatePreference