AdapterView.IOnItemClickListener.OnItemClick 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.
Callback method to be invoked when an item in this AdapterView has been clicked.
[Android.Runtime.Register("onItemClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)V", "GetOnItemClick_Landroid_widget_AdapterView_Landroid_view_View_IJHandler:Android.Widget.AdapterView/IOnItemClickListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnItemClick (Android.Widget.AdapterView? parent, Android.Views.View? view, int position, long id);
[<Android.Runtime.Register("onItemClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)V", "GetOnItemClick_Landroid_widget_AdapterView_Landroid_view_View_IJHandler:Android.Widget.AdapterView/IOnItemClickListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnItemClick : Android.Widget.AdapterView * Android.Views.View * int * int64 -> unit
Parameters
- parent
- AdapterView
The AdapterView where the click happened.
- view
- View
The view within the AdapterView that was clicked (this will be a view provided by the adapter)
- position
- Int32
The position of the view in the adapter.
- id
- Int64
The row id of the item that was clicked.
- Attributes
Remarks
Callback method to be invoked when an item in this AdapterView has been clicked.
Implementers can call getItemAtPosition(position) if they need to access the data associated with the selected item.
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.