added in version 24.1.0
belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1

SwitchPreferenceCompat

public class SwitchPreferenceCompat
extends TwoStatePreference

java.lang.Object
   ↳ android.support.v7.preference.Preference
     ↳ android.support.v7.preference.TwoStatePreference
       ↳ android.support.v7.preference.SwitchPreferenceCompat


A Preference that provides a two-state toggleable option.

This preference will store a boolean into the SharedPreferences.

Summary

Inherited XML attributes

From class android.support.v7.preference.Preference

Inherited constants

From class android.support.v7.preference.Preference

Inherited fields

From class android.support.v7.preference.TwoStatePreference

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