ItemCap
interface ItemCap
androidx.car.widget.PagedListView.ItemCap |
Interface for a RecyclerView.Adapter
to cap the number of items.
NOTE: it is still up to the adapter to use maxItems in
.
the recommended way would be with:
<code>{}Override
public int getItemCount() {
return Math.min(super.getItemCount(), mMaxItems);
}
</code>
Summary
Constants |
|
---|---|
static Int |
A value to pass to |
Public methods |
|
---|---|
abstract Unit |
setMaxItems(maxItems: Int) Sets the maximum number of items available in the adapter. |
Constants
UNLIMITED
static val UNLIMITED: Int
A value to pass to setMaxItems(int)
that indicates there should be no limit.
Value: -1