requestChildRectangleOnScreen

open fun requestChildRectangleOnScreen(@NonNull parent: RecyclerView, @NonNull child: View, @NonNull rect: Rect, immediate: Boolean): Boolean(source)

Called when a child of the RecyclerView wants a particular rectangle to be positioned onto the screen. See requestChildRectangleOnScreen for more details.

The base implementation will attempt to perform a standard programmatic scroll to bring the given rect into view, within the padded area of the RecyclerView.

Return

Whether the group scrolled to handle the operation

Parameters

parent

The parent RecyclerView.

child

The direct child making the request.

rect

The rectangle in the child's coordinates the child wishes to be on the screen.

immediate

True to forbid animated or delayed scrolling, false otherwise


open fun requestChildRectangleOnScreen(@NonNull parent: RecyclerView, @NonNull child: View, @NonNull rect: Rect, immediate: Boolean, focusedChildVisible: Boolean): Boolean(source)

Requests that the given child of the RecyclerView be positioned onto the screen. This method can be called for both unfocusable and focusable child views. For unfocusable child views, focusedChildVisible is typically true in which case, layout manager makes the child view visible only if the currently focused child stays in-bounds of RV.

Return

Whether the group scrolled to handle the operation

Parameters

parent

The parent RecyclerView.

child

The direct child making the request.

rect

The rectangle in the child's coordinates the child wishes to be on the screen.

immediate

True to forbid animated or delayed scrolling, false otherwise

focusedChildVisible

Whether the currently focused view must stay visible.