PagingConfig

class PagingConfig @JvmOverloads constructor(val pageSize: Int = 10, val prefetchDistance: Int = pageSize / 2)

An object used to configure loading behavior within a Pager, as it loads content from a PagingSource.

Constructors

Link copied to clipboard
fun PagingConfig(pageSize: Int = 10, prefetchDistance: Int = pageSize / 2)

Properties

Link copied to clipboard
val pageSize: Int = 10

Defines the number of items loaded at once from the PagingSource.

Link copied to clipboard
val prefetchDistance: Int

Prefetch distance which defines how far from the edge of loaded content an access must be to trigger further loading. Typically should be set several times the number of visible items onscreen.