leanback/src/main/java/androidx/leanback/widget/Grid.java
public void removeInvisibleItemsAtEnd(int aboveIndex, int toLimit) {
        while(mLastVisibleIndex >= mFirstVisibleIndex && mLastVisibleIndex > aboveIndex) {
            boolean offEnd = !mReversedFlow ? mProvider.getEdge(mLastVisibleIndex) >= toLimit
                    : mProvider.getEdge(mLastVisibleIndex) <= toLimit;
            if (offEnd) {
                mProvider.removeItem(mLastVisibleIndex);
                mLastVisibleIndex--;
            } else {
                break;
            }
        }
        resetVisibleIndexIfEmpty();
    }
/**
     * Removes invisible items from end until reaches item at aboveIndex or toLimit.
     * @param aboveIndex Don't remove items whose index is equals or smaller than aboveIndex
     * @param toLimit Don't remove items whose left edge is less than toLimit.
     */
Removes invisible items from end until reaches item at aboveIndex or toLimit.
@param aboveIndex Don't remove items whose index is equals or smaller than aboveIndex
@param toLimit Don't remove items whose left edge is less than toLimit.
Removes invisible items from end until reaches item at aboveIndex or toLimit . @param aboveIndex Don ' t remove items whose index is equals or smaller than aboveIndex @param toLimit Don ' t remove items whose left edge is less than toLimit .
public void removeInvisibleItemsAtEnd(int aboveIndex, int toLimit) {
        while(mLastVisibleIndex >= mFirstVisibleIndex && mLastVisibleIndex > aboveIndex) {
            boolean offEnd = !mReversedFlow ? mProvider.getEdge(mLastVisibleIndex) >= toLimit
                    : mProvider.getEdge(mLastVisibleIndex) <= toLimit;
            if (offEnd) {
                mProvider.removeItem(mLastVisibleIndex);
                mLastVisibleIndex--;
            } else {
                break;
            }
        }
        resetVisibleIndexIfEmpty();
    }
public void removeInvisibleItemsAtEnd ( int aboveIndex , int toLimit ) { while ( mLastVisibleIndex >= mFirstVisibleIndex && mLastVisibleIndex > aboveIndex ) { boolean offEnd = ! mReversedFlow ? mProvider . getEdge ( mLastVisibleIndex ) >= toLimit : mProvider . getEdge ( mLastVisibleIndex ) <= toLimit ; if ( offEnd ) { mProvider . removeItem ( mLastVisibleIndex ) ; mLastVisibleIndex -- ; } else { break ; } } resetVisibleIndexIfEmpty ( ) ; }
Removes invisible items from end until reaches item at aboveIndex or toLimit.
Removes invisible items from end until reaches item at aboveIndex or toLimit .