ItemDetailsLookup
public abstract class ItemDetailsLookup<K>
The Selection library calls getItemDetails when it needs access to information about the area and/or ItemDetails under a MotionEvent. Your implementation must negotiate ViewHolder lookup with the corresponding RecyclerView instance, and the subsequent conversion of the ViewHolder instance to an 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 |
Summary
Nested types |
|---|
public abstract class ItemDetailsLookup.ItemDetails<K>An ItemDetails implementation provides the selection library with access to information about a specific RecyclerView item. |
Public constructors |
|---|
Public methods |
|
|---|---|
abstract @Nullable ItemDetailsLookup.ItemDetails<K> |
Public constructors
Public methods
getItemDetails
public abstract @Nullable ItemDetailsLookup.ItemDetails<K> getItemDetails(@NonNull MotionEvent e)
| Returns | |
|---|---|
@Nullable ItemDetailsLookup.ItemDetails<K> |
the ItemDetails for the item under the event, or null. |