car/src/main/java/androidx/car/widget/PagedSnapHelper.java
public boolean isAtStart(RecyclerView.LayoutManager layoutManager) {
        if (layoutManager == null || layoutManager.getChildCount() == 0) {
            return true;
        }

        View firstChild = layoutManager.getChildAt(0);
        OrientationHelper orientationHelper = layoutManager.canScrollVertically()
                ? getVerticalHelper(layoutManager)
                : getHorizontalHelper(layoutManager);

        // Check that the first child is completely visible and is the first item in the list.
        return orientationHelper.getDecoratedStart(firstChild) >= 0
                && layoutManager.getPosition(firstChild) == 0;
    }
/** Returns {@code true} if the RecyclerView is completely displaying the first item. */
Returns  true if the RecyclerView is completely displaying the first item.
Returns true if the RecyclerView is completely displaying the first item .
public boolean isAtStart(RecyclerView.LayoutManager layoutManager) {
        if (layoutManager == null || layoutManager.getChildCount() == 0) {
            return true;
        }
        View firstChild = layoutManager.getChildAt(0);
        OrientationHelper orientationHelper = layoutManager.canScrollVertically()
                ? getVerticalHelper(layoutManager)
                : getHorizontalHelper(layoutManager);
        return orientationHelper.getDecoratedStart(firstChild) >= 0
                && layoutManager.getPosition(firstChild) == 0;
    }
public boolean isAtStart ( RecyclerView . LayoutManager layoutManager ) { if ( layoutManager == null || layoutManager . getChildCount ( ) == 0 ) { return true ; } View firstChild = layoutManager . getChildAt ( 0 ) ; OrientationHelper orientationHelper = layoutManager . canScrollVertically ( ) ? getVerticalHelper ( layoutManager ) : getHorizontalHelper ( layoutManager ) ; return orientationHelper . getDecoratedStart ( firstChild ) >= 0 && layoutManager . getPosition ( firstChild ) == 0 ; }
Returns {@code true} if the RecyclerView is completely displaying the first item.
Returns { @code true } if the RecyclerView is completely displaying the first item .
// Check that the first child is completely visible and is the first item in the list.