public class SettingPreference
extends androidx.preference.Preference
Preference that provides additional features supported by the Settings
library.
Preference
android:preferenceStyleandroidx.preference.Preference.BaseSavedState, androidx.preference.Preference.OnPreferenceChangeListener, androidx.preference.Preference.OnPreferenceClickListener, androidx.preference.Preference.SummaryProvider<T extends androidx.preference.Preference>| Constructor and Description |
|---|
SettingPreference(android.content.Context context)
Same as
SettingPreference(Context, AttributeSet) without attributes. |
SettingPreference(android.content.Context context,
android.util.AttributeSet attrs)
Same as
SettingPreference(Context, AttributeSet, int) with
R.attr.preferenceStyle as attribute for default style. |
SettingPreference(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
Same as
SettingPreference(Context, AttributeSet, int, int) with 0 as default
style. |
SettingPreference(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes)
Creates a new instance of SettingPreference for the given context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onBindViewHolder(androidx.preference.PreferenceViewHolder holder) |
void |
setKey(String key) |
callChangeListener, compareTo, findPreferenceInHierarchy, getContext, getDependency, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getParent, getPersistedBoolean, getPersistedFloat, getPersistedInt, getPersistedLong, getPersistedString, getPersistedStringSet, getPreferenceDataStore, getPreferenceManager, getSharedPreferences, getShouldDisableView, getSummary, getSummaryProvider, getTitle, getWidgetLayoutResource, hasKey, isCopyingEnabled, isEnabled, isIconSpaceReserved, isPersistent, isSelectable, isShown, isSingleLineTitle, isVisible, notifyChanged, notifyDependencyChange, notifyHierarchyChanged, onAttached, onAttachedToHierarchy, onAttachedToHierarchy, onClick, onDependencyChanged, onDetached, onGetDefaultValue, onInitializeAccessibilityNodeInfo, onParentChanged, onPrepareForRemoval, onRestoreInstanceState, onSaveInstanceState, onSetInitialValue, onSetInitialValue, peekExtras, performClick, performClick, persistBoolean, persistFloat, persistInt, persistLong, persistString, persistStringSet, restoreHierarchyState, saveHierarchyState, setCopyingEnabled, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIcon, setIconSpaceReserved, setIntent, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setPreferenceDataStore, setSelectable, setShouldDisableView, setSingleLineTitle, setSummary, setSummary, setSummaryProvider, setTitle, setTitle, setViewId, setVisible, setWidgetLayoutResource, shouldDisableDependents, shouldPersist, toStringpublic SettingPreference(@NonNull
android.content.Context context)
SettingPreference(Context, AttributeSet) without attributes.public SettingPreference(@NonNull
android.content.Context context,
@Nullable
android.util.AttributeSet attrs)
SettingPreference(Context, AttributeSet, int) with
R.attr.preferenceStyle as attribute for default style.public SettingPreference(@NonNull
android.content.Context context,
@Nullable
android.util.AttributeSet attrs,
@AttrRes
int defStyleAttr)
SettingPreference(Context, AttributeSet, int, int) with 0 as default
style.public SettingPreference(@NonNull
android.content.Context context,
@Nullable
android.util.AttributeSet attrs,
@AttrRes
int defStyleAttr,
@StyleRes
int defStyleRes)
context - Context in which will be the new setting preference presented.attrs - Set of Xml attributes used to configure the new instance of this preference.defStyleAttr - An attribute which contains a reference to a default style resource for
this preference within a theme of the given context.defStyleRes - Resource id of the default style for the new preference.public void setKey(@NonNull
String key)
setKey in class androidx.preference.Preferencepublic void onBindViewHolder(@NonNull
androidx.preference.PreferenceViewHolder holder)
onBindViewHolder in class androidx.preference.Preference