PagingSource.LoadParams.Prepend
public final class PagingSource.LoadParams.Prepend<Key extends Object> extends PagingSource.LoadParams
Params to load a page of data from a PagingSource via PagingSource.load to be prepended to the start of the list.
Summary
Public constructors |
|
|---|---|
Public fields
key
@NonNull
public @NonNull 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:
-
On initial load, the nullable
initialKeypassed to thePager. -
On subsequent loads due to invalidation or refresh, the result of
PagingSource.getRefreshKey. -
Prepend-LoadResult.Page.prevKeyof the loaded page at the front of the list. -
Append-LoadResult.Page.nextKeyof the loaded page at the end of the list.
Public constructors
Prepend
public final <Key extends Object> Prepend(
@NonNull Key key,
int loadSize,
boolean placeholdersEnabled
)