which line(s) of code in the lay out manager invoke (call) method onBindViewHolde (MyViewHolder holder, int position)r?

In this Android developer document https://developer.android.com/guide/topics/ui/layout/recyclerview#java , the annotation of the method onBindViewHolder(MyViewHolder holder, int position) in the MyAdapter class reads:
// Replace the contents of a view (invoked by the layout manager)

My question is: which line(s) of code in the lay out manager invoke (call) this method?

invoked by the layout manager


During layout phase onLayoutChildren (RecyclerView.Recycler recycler, RecyclerView.State state) is called.

Provided Recycler is used to call getViewForPosition (int position) which internally manages cached view pool and triggers adapters onCreateViewHolder (if there’s no view to reuse) and onBindViewHolder to return View that’s ready to be added to view hierarchy.

There are also prefetching mechanisms – collectAdjacentPrefetchPositions and collectInitialPrefetchPositions which are used to create and bind viewholders in anticipation of currently ongoing scroll.