PagingSource.LoadParams.Prepend
-
Cmn
class PagingSource.LoadParams.Prepend<Key : Any> : PagingSource.LoadParams
| kotlin.Any | ||
| ↳ | androidx.paging.PagingSource.LoadParams | |
| ↳ | androidx.paging.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.
Summary
Public properties |
||
|---|---|---|
open Key |
Key for the page to be loaded. |
Cmn
|
Inherited properties |
||||||
|---|---|---|---|---|---|---|
|
Public properties
key
open val 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.