PreferenceFragment.OnPreferenceTreeClick(PreferenceScreen, Preference) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when a preference in the displayed hierarchy is clicked.
[Android.Runtime.Register("onPreferenceTreeClick", "(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z", "GetOnPreferenceTreeClick_Landroid_preference_PreferenceScreen_Landroid_preference_Preference_Handler")]
public virtual bool OnPreferenceTreeClick(Android.Preferences.PreferenceScreen? preferenceScreen, Android.Preferences.Preference? preference);
[<Android.Runtime.Register("onPreferenceTreeClick", "(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z", "GetOnPreferenceTreeClick_Landroid_preference_PreferenceScreen_Landroid_preference_Preference_Handler")>]
abstract member OnPreferenceTreeClick : Android.Preferences.PreferenceScreen * Android.Preferences.Preference -> bool
override this.OnPreferenceTreeClick : Android.Preferences.PreferenceScreen * Android.Preferences.Preference -> bool
Parameters
- preferenceScreen
- PreferenceScreen
The preference screen that contains the clicked preference.
- preference
- Preference
The preference that was clicked.
Returns
true if the click was handled; otherwise, false. The default implementation returns the activity callback result when the preference names a fragment and the activity implements the start-fragment callback; otherwise, it returns false.
- Attributes
Remarks
If the preference names a fragment and the activity implements the start-fragment callback, this method passes the request to that callback. Otherwise, it does not handle the click.