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

        int childCount = layoutManager.getChildCount();
        View lastVisibleChild = layoutManager.getChildAt(childCount - 1);

        // The list has reached the bottom if the last child that is visible is the last item
        // in the list and it's fully shown.
        return layoutManager.getPosition(lastVisibleChild) == (layoutManager.getItemCount() - 1)
                && layoutManager.getDecoratedBottom(lastVisibleChild) <= layoutManager.getHeight();
    }
/** Returns {@code true} if the RecyclerView is completely displaying the last item. */
Returns  true if the RecyclerView is completely displaying the last item.
Returns true if the RecyclerView is completely displaying the last item .
public boolean isAtEnd(RecyclerView.LayoutManager layoutManager) {
        if (layoutManager == null || layoutManager.getChildCount() == 0) {
            return true;
        }
        int childCount = layoutManager.getChildCount();
        View lastVisibleChild = layoutManager.getChildAt(childCount - 1);
        return layoutManager.getPosition(lastVisibleChild) == (layoutManager.getItemCount() - 1)
                && layoutManager.getDecoratedBottom(lastVisibleChild) <= layoutManager.getHeight();
    }
public boolean isAtEnd ( RecyclerView . LayoutManager layoutManager ) { if ( layoutManager == null || layoutManager . getChildCount ( ) == 0 ) { return true ; } int childCount = layoutManager . getChildCount ( ) ; View lastVisibleChild = layoutManager . getChildAt ( childCount - 1 ) ; return layoutManager . getPosition ( lastVisibleChild ) == ( layoutManager . getItemCount ( ) - 1 ) && layoutManager . getDecoratedBottom ( lastVisibleChild ) <= layoutManager . getHeight ( ) ; }
Returns {@code true} if the RecyclerView is completely displaying the last item.
Returns { @code true } if the RecyclerView is completely displaying the last item .
// The list has reached the bottom if the last child that is visible is the last item // in the list and it's fully shown.