Config

class Config
kotlin.Any
   ↳ androidx.paging.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.

Summary

Nested classes

Builder class for PagedList.Config.

Properties
Boolean

Defines whether the PagedList may display null placeholders, if the PagingSource provides them.

Int

Size hint for initial load of PagedList, often larger than a regular page.

Int

Defines the maximum number of items that may be loaded into this pagedList before pages should be dropped.

Int

Size of each page loaded by the PagedList.

Int

Prefetch distance which defines how far ahead to load.

Properties

enablePlaceholders

val enablePlaceholders: Boolean

Defines whether the PagedList may display null placeholders, if the PagingSource provides them.

initialLoadSizeHint

val initialLoadSizeHint: Int

Size hint for initial load of PagedList, often larger than a regular page.

maxSize

val maxSize: Int

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.

pageSize

val pageSize: Int

Size of each page loaded by the PagedList.

prefetchDistance

val prefetchDistance: Int

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.