SwitchPreferenceCompat
open class SwitchPreferenceCompat : TwoStatePreference
kotlin.Any | |||
↳ | androidx.preference.Preference | ||
↳ | androidx.preference.TwoStatePreference | ||
↳ | androidx.preference.SwitchPreferenceCompat |
A Preference
that provides a two-state toggleable option.
This preference will save a boolean value to android.content.SharedPreferences
.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int) Construct a new SwitchPreference with the given style options. |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int) Construct a new SwitchPreference with the given style options. |
|
<init>(context: Context!, attrs: AttributeSet!) Construct a new SwitchPreference with the given style options. |
|
Construct a new SwitchPreference with default style options. |
Public methods | |
---|---|
open CharSequence! | |
open CharSequence! | |
open Unit |
onBindViewHolder(holder: PreferenceViewHolder!) |
open Unit |
setSwitchTextOff(offText: CharSequence!) Set the text displayed on the switch widget in the off state. |
open Unit |
setSwitchTextOff(resId: Int) Set the text displayed on the switch widget in the off state. |
open Unit |
setSwitchTextOn(onText: CharSequence!) Set the text displayed on the switch widget in the on state. |
open Unit |
setSwitchTextOn(resId: Int) Set the text displayed on the switch widget in the on state. |
Inherited functions | |
---|---|