v7/recyclerview/src/main/java/androidx/recyclerview/widget/PagerSnapHelper.java
@Nullable
    private View findStartView(RecyclerView.LayoutManager layoutManager,
            OrientationHelper helper) {
        int childCount = layoutManager.getChildCount();
        if (childCount == 0) {
            return null;
        }

        View closestChild = null;
        int startest = Integer.MAX_VALUE;

        for (int i = 0; i < childCount; i++) {
            final View child = layoutManager.getChildAt(i);
            int childStart = helper.getDecoratedStart(child);

            /** if child is more to start than previous closest, set it as closest  **/
            if (childStart < startest) {
                startest = childStart;
                closestChild = child;
            }
        }
        return closestChild;
    }
/**
     * Return the child view that is currently closest to the start of this parent.
     *
     * @param layoutManager The {@link RecyclerView.LayoutManager} associated with the attached
     *                      {@link RecyclerView}.
     * @param helper The relevant {@link OrientationHelper} for the attached {@link RecyclerView}.
     *
     * @return the child view that is currently closest to the start of this parent.
     */
Return the child view that is currently closest to the start of this parent.

@return the child view that is currently closest to the start of this parent.
Return the child view that is currently closest to the start of this parent . @return the child view that is currently closest to the start of this parent .
@Nullable
    private View findStartView(RecyclerView.LayoutManager layoutManager,
            OrientationHelper helper) {
        int childCount = layoutManager.getChildCount();
        if (childCount == 0) {
            return null;
        }
        View closestChild = null;
        int startest = Integer.MAX_VALUE;
        for (int i = 0; i < childCount; i++) {
            final View child = layoutManager.getChildAt(i);
            int childStart = helper.getDecoratedStart(child);
            /** if child is more to start than previous closest, set it as closest  **/
            if (childStart < startest) {
                startest = childStart;
                closestChild = child;
            }
        }
        return closestChild;
    }
@ Nullable private View findStartView ( RecyclerView . LayoutManager layoutManager , OrientationHelper helper ) { int childCount = layoutManager . getChildCount ( ) ; if ( childCount == 0 ) { return null ; } View closestChild = null ; int startest = Integer . MAX_VALUE ; for ( int i = 0 ; i < childCount ; i ++ ) { final View child = layoutManager . getChildAt ( i ) ; int childStart = helper . getDecoratedStart ( child ) ; /** if child is more to start than previous closest, set it as closest  **/ if ( childStart < startest ) { startest = childStart ; closestChild = child ; } } return closestChild ; }
Return the child view that is currently closest to the start of this parent.
Return the child view that is currently closest to the start of this parent .