PagedList.Config
public
static
class
PagedList.Config
extends Object
java.lang.Object | |
↳ | androidx.paging.PagedList.Config |
Configures how a PagedList loads content from its DataSource.
Use a Config PagedList.Config.Builder
to construct and define custom loading behavior, such as
PagedList.Config.Builder.setPageSize(int)
, which defines number of items loaded at a time}.
Summary
Nested classes | |
---|---|
class |
PagedList.Config.Builder
Builder class for |
Constants | |
---|---|
int |
MAX_SIZE_UNBOUNDED
When |
Fields | |
---|---|
public
final
boolean |
enablePlaceholders
Defines whether the PagedList may display null placeholders, if the DataSource provides them. |
public
final
int |
initialLoadSizeHint
Size hint for initial load of PagedList, often larger than a regular page. |
public
final
int |
maxSize
Defines the maximum number of items that may be loaded into this pagedList before pages should be dropped. |
public
final
int |
pageSize
Size of each page loaded by the PagedList. |
public
final
int |
prefetchDistance
Prefetch distance which defines how far ahead to load. |
Inherited methods | |
---|---|
Constants
MAX_SIZE_UNBOUNDED
public static final int MAX_SIZE_UNBOUNDED
When maxSize
is set to MAX_SIZE_UNBOUNDED
, the maximum number of items
loaded is unbounded, and pages will never be dropped.
Constant Value: 2147483647 (0x7fffffff)
Fields
enablePlaceholders
public final boolean enablePlaceholders
Defines whether the PagedList may display null placeholders, if the DataSource provides them.
initialLoadSizeHint
public final int initialLoadSizeHint
Size hint for initial load of PagedList, often larger than a regular page.
maxSize
public final int maxSize
Defines the maximum number of items that may be loaded into this pagedList before pages should be dropped.
PageKeyedDataSource
does not currently support dropping pages - when
loading from a PageKeyedDataSource
, this value is ignored.
pageSize
public final int pageSize
Size of each page loaded by the PagedList.
prefetchDistance
public final int prefetchDistance
Prefetch distance which defines how far ahead to load.
If this value is set to 50, the paged list will attempt to load 50 items in advance of data that's already been accessed.
See also:
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-24 UTC.