Share via


PreferenceActivity.OnBuildHeaders Method

Definition

Called when the activity needs its list of headers build.

[Android.Runtime.Register("onBuildHeaders", "(Ljava/util/List;)V", "GetOnBuildHeaders_Ljava_util_List_Handler")]
public virtual void OnBuildHeaders (System.Collections.Generic.IList<Android.Preferences.PreferenceActivity.Header>? target);
[<Android.Runtime.Register("onBuildHeaders", "(Ljava/util/List;)V", "GetOnBuildHeaders_Ljava_util_List_Handler")>]
abstract member OnBuildHeaders : System.Collections.Generic.IList<Android.Preferences.PreferenceActivity.Header> -> unit
override this.OnBuildHeaders : System.Collections.Generic.IList<Android.Preferences.PreferenceActivity.Header> -> unit

Parameters

target
IList<PreferenceActivity.Header>

The list in which to place the headers.

Attributes

Remarks

Called when the activity needs its list of headers build. By implementing this and adding at least one item to the list, you will cause the activity to run in its modern fragment mode. Note that this function may not always be called; for example, if the activity has been asked to display a particular fragment without the header list, there is no need to build the headers.

Typical implementations will use #loadHeadersFromResource to fill in the list from a resource.

Java documentation for android.preference.PreferenceActivity.onBuildHeaders(java.util.List<android.preference.PreferenceActivity.Header>).

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