Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

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!)

<init>(context: Context!)

Public methods
open Boolean

Returns whether dependents are disabled when this preference is on (true) or when this preference is off (false).

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 (true) or when this preference is off (false).

open Unit

Sets the summary to be shown when unchecked.

open Unit
setSummaryOff(summaryResId: Int)

open Unit

Sets the summary to be shown when checked.

open Unit
setSummaryOn(summaryResId: Int)

open Boolean

Protected methods
open Unit

open Any!

open Unit

open Parcelable!

open Unit
onSetInitialValue(defaultValue: Any?)

open Unit

Sync a summary holder contained within holder's sub-hierarchy with the correct summary text.

Inherited functions