Partager via


PreferenceGroup.AddPreference(Preference) Method

Definition

Adds a Preference at the correct position based on the preference's order.

[Android.Runtime.Register("addPreference", "(Landroid/preference/Preference;)Z", "GetAddPreference_Landroid_preference_Preference_Handler")]
public virtual bool AddPreference (Android.Preferences.Preference? preference);
[<Android.Runtime.Register("addPreference", "(Landroid/preference/Preference;)Z", "GetAddPreference_Landroid_preference_Preference_Handler")>]
abstract member AddPreference : Android.Preferences.Preference -> bool
override this.AddPreference : Android.Preferences.Preference -> bool

Parameters

preference
Preference

The preference to add.

Returns

Whether the preference is now in this group.

Attributes

Remarks

Adds a Preference at the correct position based on the preference's order.

Java documentation for android.preference.PreferenceGroup.addPreference(android.preference.Preference).

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