public class SettingSwitchPreference
extends android.preference.SwitchPreference
SwitchPreference that provides additional features supported by the Settings
library.
SwitchPreference
android:switchPreferenceStyle| Constructor and Description |
|---|
SettingSwitchPreference(android.content.Context context)
Same as
SettingSwitchPreference(Context, AttributeSet) without attributes. |
SettingSwitchPreference(android.content.Context context,
android.util.AttributeSet attrs)
Same as
SettingSwitchPreference(Context, AttributeSet, int) with
R.attr.switchPreferenceStyle as attribute for default style. |
SettingSwitchPreference(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
Same as
SettingSwitchPreference(Context, AttributeSet, int, int) with 0 as
default style. |
SettingSwitchPreference(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes)
Creates a new instance of SettingSwitchPreference for the given context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onBindView(android.view.View view) |
void |
setKey(String key) |
getSwitchTextOff, getSwitchTextOn, setSwitchTextOff, setSwitchTextOff, setSwitchTextOn, setSwitchTextOngetDisableDependentsState, getSummaryOff, getSummaryOn, isChecked, onClick, onGetDefaultValue, onRestoreInstanceState, onSaveInstanceState, onSetInitialValue, setChecked, setDisableDependentsState, setSummaryOff, setSummaryOff, setSummaryOn, setSummaryOn, shouldDisableDependentscallChangeListener, compareTo, findPreferenceInHierarchy, getContext, getDependency, getEditor, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getPersistedBoolean, getPersistedFloat, getPersistedInt, getPersistedLong, getPersistedString, getPersistedStringSet, getPreferenceManager, getSharedPreferences, getShouldDisableView, getSummary, getTitle, getTitleRes, getView, getWidgetLayoutResource, hasKey, isEnabled, isPersistent, isSelectable, notifyChanged, notifyDependencyChange, notifyHierarchyChanged, onAttachedToActivity, onAttachedToHierarchy, onCreateView, onDependencyChanged, onParentChanged, onPrepareForRemoval, peekExtras, persistBoolean, persistFloat, persistInt, persistLong, persistString, persistStringSet, restoreHierarchyState, saveHierarchyState, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIcon, setIntent, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setSelectable, setShouldDisableView, setSummary, setSummary, setTitle, setTitle, setWidgetLayoutResource, shouldCommit, shouldPersist, toStringpublic SettingSwitchPreference(android.content.Context context)
SettingSwitchPreference(Context, AttributeSet) without attributes.public SettingSwitchPreference(android.content.Context context,
android.util.AttributeSet attrs)
SettingSwitchPreference(Context, AttributeSet, int) with
R.attr.switchPreferenceStyle as attribute for default style.public SettingSwitchPreference(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
SettingSwitchPreference(Context, AttributeSet, int, int) with 0 as
default style.public SettingSwitchPreference(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
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(String key)
setKey in class android.preference.Preferencepublic void onBindView(android.view.View view)
onBindView in class android.preference.SwitchPreference