Android Guides | Samples

Android.Widget.ListView.AddHeaderView Method

Add a fixed view to appear at the top of the list.

Syntax

[Android.Runtime.Register("addHeaderView", "(Landroid/view/View;)V", "GetAddHeaderView_Landroid_view_View_Handler")]
public virtual Void AddHeaderView (View v)

Parameters

v
The view to add.

Remarks

Add a fixed view to appear at the top of the list. If addHeaderView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want.

Note: When first introduced, this method could only be called before setting the adapter with ListView.Adapter. Starting with Build+VERSION_CODES.KitKat, this method may be called at any time. If the ListView's adapter does not extend HeaderViewListAdapter, it will be wrapped with a supporting instance of IWrapperListAdapter.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1