Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# AdapterView.OnItemLongClickListener

*** ** * ** ***


`
public
static


interface
AdapterView.OnItemLongClickListener
`


`


`

|---|
| android.widget.AdapterView.OnItemLongClickListener |

<br />

*** ** * ** ***

Interface definition for a callback to be invoked when an item in this
view has been clicked and held.

## Summary

| ### Public methods ||
|---|---|
| ` abstract boolean` | ` https://developer.android.com/reference/android/widget/AdapterView.OnItemLongClickListener#onItemLongClick(android.widget.AdapterView<?>,%20android.view.View,%20int,%20long)(https://developer.android.com/reference/android/widget/AdapterView<?> parent, https://developer.android.com/reference/android/view/View view, int position, long id) ` Callback method to be invoked when an item in this view has been clicked and held. |

## Public methods

### onItemLongClick

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

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.

<br />

| Parameters ||
|---|---|
| `parent` | `AdapterView`: The AbsListView where the click happened <br /> |
| `view` | `View`: The view within the AbsListView that was clicked <br /> |
| `position` | `int`: The position of the view in the list <br /> |
| `id` | `long`: The row id of the item that was clicked <br /> |

| Returns ||
|---|---|
| `boolean` | true if the callback consumed the long click, false otherwise <br /> |