AdapterView.IOnItemLongClickListener.OnItemLongClick 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 view has been clicked and held.
[Android.Runtime.Register("onItemLongClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)Z", "GetOnItemLongClick_Landroid_widget_AdapterView_Landroid_view_View_IJHandler:Android.Widget.AdapterView/IOnItemLongClickListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnItemLongClick (Android.Widget.AdapterView? parent, Android.Views.View? view, int position, long id);
[<Android.Runtime.Register("onItemLongClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)Z", "GetOnItemLongClick_Landroid_widget_AdapterView_Landroid_view_View_IJHandler:Android.Widget.AdapterView/IOnItemLongClickListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnItemLongClick : Android.Widget.AdapterView * Android.Views.View * int * int64 -> bool
Parameters
- parent
- AdapterView
The AbsListView where the click happened
- view
- View
The view within the AbsListView that was clicked
- position
- Int32
The position of the view in the list
- id
- Int64
The row id of the item that was clicked
Returns
true if the callback consumed the long click, false otherwise
- Attributes
Remarks
Callback method to be invoked when an item in this view has been clicked and held.
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.