DialogPreference.TargetFragment


interface DialogPreference.TargetFragment

PreferenceFragmentCompat

A PreferenceFragmentCompat is the entry point to using the Preference library.

PreferenceFragment

This class is deprecated.

Use PreferenceFragmentCompat instead

BaseLeanbackPreferenceFragmentCompat

This fragment provides a preference fragment with leanback-style behavior, suitable for embedding into broader UI elements.

BaseLeanbackPreferenceFragment

This class is deprecated.

Use BaseLeanbackPreferenceFragmentCompat

LeanbackPreferenceFragmentCompat

This fragment provides a fully decorated leanback-style preference fragment, including a list background and header.

LeanbackPreferenceFragment

This class is deprecated.

Use LeanbackPreferenceFragmentCompat


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

Summary

Public functions

T?

Finds a Preference with the given key.

Public functions

findPreference

Added in 1.1.0
fun <T : Preference?> findPreference(key: CharSequence): T?

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

See also
findPreference

Follow best practices, eliminate boilerplate code, and reduce fragmentation

Updated Oct 28, 2024

Android Studio provides app builders with an integrated development environment (IDE) optimized for Android apps. Download Android Studio today.

Updated Apr 12, 2023

Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.

Updated Jul 12, 2023