Udostępnij za pośrednictwem


PreferenceGroup.FindPreference Method

Definition

Overloads

FindPreference(String)

Finds a Preference based on its key.

FindPreference(ICharSequence)

Finds a Preference based on its key.

FindPreference(String)

Finds a Preference based on its key.

public Android.Preferences.Preference? FindPreference (string? key);
member this.FindPreference : string -> Android.Preferences.Preference

Parameters

key
String

The key of the preference to retrieve.

Returns

The Preference with the key, or null.

Remarks

Finds a Preference based on its key. If two Preference share the same key (not recommended), the first to appear will be returned (to retrieve the other preference with the same key, call this method on the first preference). If this preference has the key, it will not be returned.

This will recursively search for the preference into children that are also PreferenceGroup PreferenceGroups.

Java documentation for android.preference.PreferenceGroup.findPreference(java.lang.CharSequence).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

FindPreference(ICharSequence)

Finds a Preference based on its key.

[Android.Runtime.Register("findPreference", "(Ljava/lang/CharSequence;)Landroid/preference/Preference;", "GetFindPreference_Ljava_lang_CharSequence_Handler")]
public virtual Android.Preferences.Preference? FindPreference (Java.Lang.ICharSequence? key);
[<Android.Runtime.Register("findPreference", "(Ljava/lang/CharSequence;)Landroid/preference/Preference;", "GetFindPreference_Ljava_lang_CharSequence_Handler")>]
abstract member FindPreference : Java.Lang.ICharSequence -> Android.Preferences.Preference
override this.FindPreference : Java.Lang.ICharSequence -> Android.Preferences.Preference

Parameters

key
ICharSequence

The key of the preference to retrieve.

Returns

The Preference with the key, or null.

Attributes

Remarks

Finds a Preference based on its key. If two Preference share the same key (not recommended), the first to appear will be returned (to retrieve the other preference with the same key, call this method on the first preference). If this preference has the key, it will not be returned.

This will recursively search for the preference into children that are also PreferenceGroup PreferenceGroups.

Java documentation for android.preference.PreferenceGroup.findPreference(java.lang.CharSequence).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to