Example usage for Java android.preference CheckBoxPreference fields, constructors, methods, implement or subclass
The text is from its open source code.
Context | getContext() Returns the android.content.Context of this Preference. |
String | getDependency() Returns the key of the dependency on this Preference. |
String | getKey() Gets the key for this Preference, which is also the key used for storing values into SharedPreferences or PreferenceDataStore . |
OnPreferenceChangeListener | getOnPreferenceChangeListener() Returns the callback to be invoked when this Preference is changed by the user (but before the internal state has been updated). |
int | getOrder() Gets the order of this Preference with respect to other Preference objects on the same level. |
CharSequence | getSummary() Returns the summary of this Preference. |
CharSequence | getSummaryOff() Returns the summary to be shown when unchecked. |
CharSequence | getSummaryOn() Returns the summary to be shown when checked. |
CharSequence | getTitle() Returns the title of this Preference. |
boolean | isChecked() Returns the checked state. |
boolean | isEnabled() Checks whether this Preference should be enabled in the list. |
boolean | isPersistent() Checks whether this Preference is persistent. |
void | setChecked(boolean checked) Sets the checked state and saves it to the SharedPreferences . |
void | setDefaultValue(Object defaultValue) Sets the default value for this Preference, which will be set either if persistence is off or persistence is on and the preference is not found in the persistent storage. |
void | setDependency(String dependencyKey) Sets the key of a Preference that this Preference will depend on. |
void | setDisableDependentsState(boolean disableDependentsState) Sets whether dependents are disabled when this preference is on ( true ) or when this preference is off ( false ). |
void | setEnabled(boolean enabled) Sets whether this Preference is enabled. |
void | setIcon(Drawable icon) Sets the icon for this Preference with a Drawable. |
void | setKey(String key) Sets the key for this Preference, which is used as a key to the SharedPreferences or PreferenceDataStore . |
void | setOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener) Sets the callback to be invoked when this Preference is changed by the user (but before the internal state has been updated). |
void | setOnPreferenceClickListener(OnPreferenceClickListener onPreferenceClickListener) Sets the callback to be invoked when this Preference is clicked. |
void | setPersistent(boolean persistent) Sets whether this Preference is persistent. |
void | setSummary(CharSequence summary) Sets the summary for this Preference with a CharSequence. |
void | setTitle(CharSequence title) Sets the title for this Preference with a CharSequence. |