TwoStatePreference
abstract class TwoStatePreference : Preference
kotlin.Any | ||
↳ | androidx.preference.Preference | |
↳ | androidx.preference.TwoStatePreference |
Common base class for preferences that have two selectable states, save a boolean value, and may have dependent preferences that are enabled/disabled based on the current state.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int) |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int) |
|
<init>(context: Context!, attrs: AttributeSet!) |
|
Public methods | |
---|---|
open Boolean |
Returns whether dependents are disabled when this preference is on ( |
open CharSequence! |
Returns the summary to be shown when unchecked. |
open CharSequence! |
Returns the summary to be shown when checked. |
open Boolean |
Returns the checked state. |
open Unit |
setChecked(checked: Boolean) Sets the checked state and saves it. |
open Unit |
setDisableDependentsState(disableDependentsState: Boolean) Sets whether dependents are disabled when this preference is on ( |
open Unit |
setSummaryOff(summary: CharSequence!) Sets the summary to be shown when unchecked. |
open Unit |
setSummaryOff(summaryResId: Int) |
open Unit |
setSummaryOn(summary: CharSequence!) Sets the summary to be shown when checked. |
open Unit |
setSummaryOn(summaryResId: Int) |
open Boolean |
Protected methods | |
---|---|
open Unit |
onClick() |
open Any! |
onGetDefaultValue(a: TypedArray!, index: Int) |
open Unit |
onRestoreInstanceState(state: Parcelable!) |
open Parcelable! | |
open Unit |
onSetInitialValue(defaultValue: Any?) |
open Unit |
syncSummaryView(holder: PreferenceViewHolder!) Sync a summary holder contained within holder's sub-hierarchy with the correct summary text. |
Inherited functions | |
---|---|