findContainingItemView

Traverses the ancestors of the given view and returns the item view that contains it and also a direct child of the LayoutManager.

Note that this method may return null if the view is a child of the RecyclerView but not a child of the LayoutManager (e.g. running a disappear animation).

Return

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

Parameters

view

The view that is a descendant of the LayoutManager.

See also