public interface

PagedListView.ItemCap

 androidx.car.widget.PagedListView.ItemCap

Subclasses:

CarDrawerAdapter, ListItemAdapter

Overview

Interface for a to cap the number of items.

NOTE: it is still up to the adapter to use maxItems in .

the recommended way would be with:

 {@literal@}Override
 public int getItemCount() {
   return Math.min(super.getItemCount(), mMaxItems);
 }
 

Summary

Fields
public static final intUNLIMITED

A value to pass to PagedListView.ItemCap.setMaxItems(int) that indicates there should be no limit.

Methods
public voidsetMaxItems(int maxItems)

Sets the maximum number of items available in the adapter.

Fields

public static final int UNLIMITED

A value to pass to PagedListView.ItemCap.setMaxItems(int) that indicates there should be no limit.

Methods

public void setMaxItems(int maxItems)

Sets the maximum number of items available in the adapter. A value less than '0' means the list should not be capped.