Most visited

Recently visited

Added in API level 1

AdapterView.OnItemLongClickListener

public static interface AdapterView.OnItemLongClickListener

android.widget.AdapterView.OnItemLongClickListener


在单击并保持此视图中的项目时调用回调的接口定义。

Summary

Public methods

abstract boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id)

当单击并保持此视图中的项目时调用回调方法。

Public methods

onItemLongClick

Added in API level 1
boolean onItemLongClick (AdapterView<?> parent, 
                View view, 
                int position, 
                long id)

当单击并保持此视图中的项目时调用回调方法。 如果需要访问与选定项目相关的数据,实施者可以调用getItemAtPosition(position)。

Parameters
parent AdapterView: The AbsListView where the click happened
view View: The view within the AbsListView that was clicked
position int: The position of the view in the list
id long: The row id of the item that was clicked
Returns
boolean true if the callback consumed the long click, false otherwise

Hooray!