SwitchPreferenceCompat

public class SwitchPreferenceCompat
extends TwoStatePreference

java.lang.Object
   ↳ 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 SharedPreferences.

Summary

Inherited constants

Inherited fields

Public constructors

SwitchPreferenceCompat(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Construct a new SwitchPreference with the given style options.

SwitchPreferenceCompat(Context context, AttributeSet attrs, int defStyleAttr)

Construct a new SwitchPreference with the given style options.

SwitchPreferenceCompat(Context context, AttributeSet attrs)

Construct a new SwitchPreference with the given style options.

SwitchPreferenceCompat(Context context)

Construct a new SwitchPreference with default style options.

Public methods

CharSequence getSwitchTextOff()
CharSequence getSwitchTextOn()
void onBindViewHolder(PreferenceViewHolder holder)

Binds the created View to the data for this preference.

void