# ItemDetailsLookup

Artifact: [androidx.recyclerview:recyclerview-selection](https://developer.android.com/jetpack/androidx/releases/recyclerview) [View Source](https://cs.android.com/search?q=file:androidx/recyclerview/selection/ItemDetailsLookup.java+class:androidx.recyclerview.selection.ItemDetailsLookup) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)

*** ** * ** ***


```
public abstract class ItemDetailsLookup<K>
```

<br />

*** ** * ** ***

The Selection library calls `https://developer.android.com/reference/androidx/recyclerview/selection/ItemDetailsLookup#getItemDetails(android.view.MotionEvent)` when it needs access to information about the area and/or `https://developer.android.com/reference/androidx/recyclerview/selection/ItemDetailsLookup.ItemDetails` under a `https://developer.android.com/reference/android/view/MotionEvent.html`. Your implementation must negotiate `https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.ViewHolder` lookup with the corresponding RecyclerView instance, and the subsequent conversion of the ViewHolder instance to an `https://developer.android.com/reference/androidx/recyclerview/selection/ItemDetailsLookup.ItemDetails` instance.

**Example**

```
final class MyDetailsLookup extends ItemDetailsLookup{

  private final RecyclerView mRecyclerView;

  MyDetailsLookup(RecyclerView recyclerView) {
      mRecyclerView = recyclerView;
  }

  public @Nullable ItemDetails
```

| Parameters |
|---|---|
| `<K>` | Selection key type. @see `https://developer.android.com/reference/androidx/recyclerview/selection/StorageStrategy` for supported types. |

## Summary

| ### Nested types |
|---|
| `public abstract class https://developer.android.com/reference/androidx/recyclerview/selection/ItemDetailsLookup.ItemDetails<K>` An ItemDetails implementation provides the selection library with access to information about a specific RecyclerView item. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/recyclerview/selection/ItemDetailsLookup#ItemDetailsLookup()()` |

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/recyclerview/selection/ItemDetailsLookup.ItemDetails<K>` | `https://developer.android.com/reference/androidx/recyclerview/selection/ItemDetailsLookup#getItemDetails(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html e)` |

## Public constructors

### ItemDetailsLookup

Added in 1.0.0

```
public ItemDetailsLookup()
```

## Public methods

### getItemDetails

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)

```
public abstract @Nullable ItemDetailsLookup.ItemDetails<K> getItemDetails(@NonNull MotionEvent e)
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/recyclerview/selection/ItemDetailsLookup.ItemDetails<K>` | the ItemDetails for the item under the event, or null. |