ArrayAdapter.GetView(Int32, View, ViewGroup) Method

Definition

Get a View that displays the data at the specified position in the data set.

[Android.Runtime.Register("getView", "(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;", "GetGetView_ILandroid_view_View_Landroid_view_ViewGroup_Handler")]
public override Android.Views.View GetView (int position, Android.Views.View? convertView, Android.Views.ViewGroup parent);
[<Android.Runtime.Register("getView", "(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;", "GetGetView_ILandroid_view_View_Landroid_view_ViewGroup_Handler")>]
override this.GetView : int * Android.Views.View * Android.Views.ViewGroup -> Android.Views.View

Parameters

position
Int32

The position of the item within the adapter's data set of the item whose view we want.

convertView
View

The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view. Heterogeneous lists can specify their number of view types, so that this View is always of the right type (see Android.Widget.BaseAdapter1.getViewTypeCount()</a> and <a href="https://docs.microsoft.com/en-us/search/index?search='Android Widget BaseAdapter1 getItemViewType(int)';scope=Xamarin" title="Android.Widget.BaseAdapter1.getItemViewType(int)">Android.Widget.BaseAdapter1.getItemViewType(int)).

parent
ViewGroup

The parent that this view will eventually be attached to

Returns

Implements

Attributes

Remarks

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