public class

SelfRemovingSwitchPreference

extends SwitchPreference
java.lang.Object
   ↳ android.support.v7.preference.Preference
     ↳ android.support.v7.preference.TwoStatePreference
       ↳ android.support.v14.preference.SwitchPreference
         ↳ lineageos.preference.SelfRemovingSwitchPreference
Known Direct Subclasses

Class Overview

A SwitchPreference which can automatically remove itself from the hierarchy based on constraints set in XML.

Summary

[Expand]
Inherited Constants
From class android.support.v7.preference.Preference
[Expand]
Inherited Fields
From class android.support.v7.preference.TwoStatePreference
Public Constructors
SelfRemovingSwitchPreference(Context context, AttributeSet attrs, int defStyle)
SelfRemovingSwitchPreference(Context context, AttributeSet attrs)
SelfRemovingSwitchPreference(Context context)
Public Methods
boolean isAvailable()
void onAttached()
void onBindViewHolder(PreferenceViewHolder holder)
void setAvailable(boolean available)
[Expand]
Inherited Methods
From class android.support.v14.preference.SwitchPreference
From class android.support.v7.preference.TwoStatePreference
From class android.support.v7.preference.Preference
From class java.lang.Object
From interface java.lang.Comparable

Public Constructors

public SelfRemovingSwitchPreference (Context context, AttributeSet attrs, int defStyle)

added in API level 8

Parameters
context Context
attrs AttributeSet
defStyle int

public SelfRemovingSwitchPreference (Context context, AttributeSet attrs)

added in API level 8

Parameters
context Context
attrs AttributeSet

public SelfRemovingSwitchPreference (Context context)

added in API level 8

Parameters
context Context

Public Methods

public boolean isAvailable ()

added in API level 8

Returns
boolean

public void onAttached ()

public void onBindViewHolder (PreferenceViewHolder holder)

Parameters
holder PreferenceViewHolder

public void setAvailable (boolean available)

added in API level 8

Parameters
available boolean