{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class PagedList.Config
Configures how a PagedList
loads content from its PagingSource
.
Use PagedList.Config.Builder
to construct and define custom loading behavior, such as setPageSize
, which defines number of items loaded at a time.
Nested types |
|
---|---|
PagedList.Config.Builder |
Builder class for |
Public fields |
|
---|---|
final boolean |
Defines whether the |
final int |
Size hint for initial load of PagedList, often larger than a regular page. |
final int |
Defines the maximum number of items that may be loaded into this pagedList before pages should be dropped. |
final int |
Size of each page loaded by the PagedList. |
final int |
Prefetch distance which defines how far ahead to load. |
@NonNull
public final boolean enablePlaceholders
Defines whether the PagedList
may display null placeholders, if the PagingSource
provides them.
@NonNull
public final int initialLoadSizeHint
Size hint for initial load of PagedList, often larger than a regular page.
@NonNull
public final int maxSize
Defines the maximum number of items that may be loaded into this pagedList before pages should be dropped.
If set to PagedList.Config.Companion.MAX_SIZE_UNBOUNDED
, pages will never be dropped.
See also | |
---|---|
MAX_SIZE_UNBOUNDED |
|
setMaxSize |
@NonNull
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 | |
---|---|
loadAround |