findContainingItemView

Traverses the ancestors of the given view and returns the item view that contains it and also a direct child of the RecyclerView. This returned view can be used to get the ViewHolder by calling getChildViewHolder.

Return

The direct child of the RecyclerView which contains the given view or null if the provided view is not a descendant of this RecyclerView.

Parameters

view

The view that is a descendant of the RecyclerView.

See also