added in version 2.0.0
belongs to Maven artifact androidx.paging:paging-common:2.0.0-beta01

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 PagedList.Config

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 pageSize

Size of each page loaded by the PagedList.

public final int prefetchDistance

Prefetch distance which defines how far ahead to load.

Inherited methods

Fields

enablePlaceholders

added in version 2.0.0
public final boolean enablePlaceholders

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

initialLoadSizeHint

added in version 2.0.0
public final int initialLoadSizeHint

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

pageSize

added in version 2.0.0
public final int pageSize

Size of each page loaded by the PagedList.

prefetchDistance

added in version 2.0.0
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.