belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1
Preference.OnPreferenceChangeListener
public
static
interface
Preference.OnPreferenceChangeListener
android.support.v7.preference.Preference.OnPreferenceChangeListener |
Interface definition for a callback to be invoked when the value of this
Preference
has been changed by the user and is
about to be set and/or persisted. This gives the client a chance
to prevent setting and/or persisting the value.
Summary
Public methods | |
---|---|
abstract
boolean
|
onPreferenceChange(Preference preference, Object newValue)
Called when a Preference has been changed by the user. |
Public methods
onPreferenceChange
boolean onPreferenceChange (Preference preference, Object newValue)
Called when a Preference has been changed by the user. This is called before the state of the Preference is about to be updated and before the state is persisted.
Parameters | |
---|---|
preference |
Preference : The changed Preference. |
newValue |
Object : The new value of the Preference. |
Returns | |
---|---|
boolean |
True to update the state of the Preference with the new value. |
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