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

<Key extends Object> Prepend(
    @NonNull Key key,
    int loadSize,
    boolean placeholdersEnabled
)

Public methods

@NonNull Key

Key for the page to be loaded.

Inherited methods

From androidx.paging.PagingSource.LoadParams
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 constructors

Prepend

public <Key extends Object> Prepend(
    @NonNull Key key,
    int loadSize,
    boolean placeholdersEnabled
)

Public methods

getKey

Added in 3.3.4
public @NonNull Key getKey()

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: