public class

DataCollectionEnabledPreference

extends UACheckBoxPreference
java.lang.Object
   ↳ androidx.preference.Preference
     ↳ androidx.preference.TwoStatePreference
       ↳ androidx.preference.CheckBoxPreference
         ↳ com.urbanairship.preference.UACheckBoxPreference
           ↳ com.urbanairship.preference.DataCollectionEnabledPreference

Class Overview

Preference that can be used to embed a data collection preference in a settings screen.

Summary

[Expand]
Inherited Constants
From class androidx.preference.Preference
[Expand]
Inherited Fields
From class com.urbanairship.preference.UACheckBoxPreference
From class androidx.preference.TwoStatePreference
Public Constructors
DataCollectionEnabledPreference(Context context, AttributeSet attrs, int defStyleAttr)
DataCollectionEnabledPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
DataCollectionEnabledPreference(Context context, AttributeSet attrs)
Public Methods
void onAttached()
void onDetached()
Protected Methods
boolean getInitialAirshipValue(UAirship airship)
Gets the initial Airship value for the preference.
void onApplyAirshipPreference(UAirship airship, boolean enabled)
Called when the preference should be set on Airship.
[Expand]
Inherited Methods
From class com.urbanairship.preference.UACheckBoxPreference
From class androidx.preference.CheckBoxPreference
From class androidx.preference.TwoStatePreference
From class androidx.preference.Preference
From class java.lang.Object
From interface java.lang.Comparable

Public Constructors

public DataCollectionEnabledPreference (Context context, AttributeSet attrs, int defStyleAttr)

public DataCollectionEnabledPreference (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

public DataCollectionEnabledPreference (Context context, AttributeSet attrs)

Public Methods

public void onAttached ()

public void onDetached ()

Protected Methods

protected boolean getInitialAirshipValue (UAirship airship)

Gets the initial Airship value for the preference.

Parameters
airship The UAirship instance.
Returns
  • The initial value for the preference.

protected void onApplyAirshipPreference (UAirship airship, boolean enabled)

Called when the preference should be set on Airship.

Parameters
airship The UAirship instance.
enabled The value of the preference.