PagingSource.LoadParams

public class PagingSource.LoadParams<Key extends Object>

Known direct subclasses
PagingSource.LoadParams.Append

Params to load a page of data from a PagingSource via PagingSource.load to be appended to the end of the list.

PagingSource.LoadParams.Prepend

Params to load a page of data from a PagingSource via PagingSource.load to be prepended to the start of the list.

PagingSource.LoadParams.Refresh

Params for an initial load request on a PagingSource from PagingSource.load or a refresh triggered by invalidate.


Params for a load request on a PagingSource from PagingSource.load.

Summary

Nested types

PagingSource.LoadParams.Append

Params to load a page of data from a PagingSource via PagingSource.load to be appended to the end of the list.

PagingSource.LoadParams.Prepend

Params to load a page of data from a PagingSource via PagingSource.load to be prepended to the start of the list.

PagingSource.LoadParams.Refresh

Params for an initial load request on a PagingSource from PagingSource.load or a refresh triggered by invalidate.

Public fields

abstract @Nullable Key

Key for the page to be loaded.

final int

Requested number of items to load.

final boolean

From PagingConfig.enablePlaceholders, true if placeholders are enabled and the load request for this LoadParams should populate LoadResult.Page.itemsBefore and LoadResult.Page.itemsAfter if possible.

Public fields

key

@Nullable
public abstract @Nullable Key key

Key for the page to be loaded.

key can be null only if this LoadParams is Refresh, and either no initialKey is provided to the Pager or PagingSource.getRefreshKey from the previous PagingSource returns null.

The value of key is dependent on the type of LoadParams:

loadSize

@NonNull
public final int loadSize

Requested number of items to load.

Note: It is valid for PagingSource.load to return a LoadResult that has a different number of items than the requested load size.

placeholdersEnabled

@NonNull
public final boolean placeholdersEnabled

From PagingConfig.enablePlaceholders, true if placeholders are enabled and the load request for this LoadParams should populate LoadResult.Page.itemsBefore and LoadResult.Page.itemsAfter if possible.