Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

DialogPreference.TargetFragment

public static interface DialogPreference.TargetFragment

androidx.preference.DialogPreference.TargetFragment


Interface for PreferenceFragmentCompats to implement to allow DialogPreferences to find the preference that launched the dialog.

Summary

Public methods

abstract <T extends Preference> T findPreference(CharSequence key)

Finds a Preference with the given key.

Public methods

findPreference

public abstract T findPreference (CharSequence key)

Finds a Preference with the given key. Returns null if no Preference could be found with the given key.

Parameters
key CharSequence: The key of the Preference to retrieve

Returns
T The Preference with the key, or null