次の方法で共有


ListView.AddHeaderView Method

Definition

Overloads

AddHeaderView(View)

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

AddHeaderView(View, Object, Boolean)

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

AddHeaderView(View)

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

[Android.Runtime.Register("addHeaderView", "(Landroid/view/View;)V", "GetAddHeaderView_Landroid_view_View_Handler")]
public virtual void AddHeaderView (Android.Views.View? v);
[<Android.Runtime.Register("addHeaderView", "(Landroid/view/View;)V", "GetAddHeaderView_Landroid_view_View_Handler")>]
abstract member AddHeaderView : Android.Views.View -> unit
override this.AddHeaderView : Android.Views.View -> unit

Parameters

v
View

The view to add.

Attributes

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 #setAdapter(ListAdapter). Starting with android.os.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 WrapperListAdapter.

Java documentation for android.widget.ListView.addHeaderView(android.view.View).

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

AddHeaderView(View, Object, Boolean)

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

[Android.Runtime.Register("addHeaderView", "(Landroid/view/View;Ljava/lang/Object;Z)V", "GetAddHeaderView_Landroid_view_View_Ljava_lang_Object_ZHandler")]
public virtual void AddHeaderView (Android.Views.View? v, Java.Lang.Object? data, bool isSelectable);
[<Android.Runtime.Register("addHeaderView", "(Landroid/view/View;Ljava/lang/Object;Z)V", "GetAddHeaderView_Landroid_view_View_Ljava_lang_Object_ZHandler")>]
abstract member AddHeaderView : Android.Views.View * Java.Lang.Object * bool -> unit
override this.AddHeaderView : Android.Views.View * Java.Lang.Object * bool -> unit

Parameters

v
View

The view to add.

data
Object

Data to associate with this view

isSelectable
Boolean

whether the item is selectable

Attributes

Remarks

Add a fixed view to appear at the top of the list. If this method 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 #setAdapter(ListAdapter). Starting with android.os.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 WrapperListAdapter.

Java documentation for android.widget.ListView.addHeaderView(android.view.View, java.lang.Object, boolean).

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