Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 2.0.0
belongs to Maven artifact androidx.paging:paging-common:2.1.0-alpha01

PageKeyedDataSource.LoadParams

public static class PageKeyedDataSource.LoadParams
extends Object

java.lang.Object
   ↳ androidx.paging.PageKeyedDataSource.LoadParams<Key>


Holder object for inputs to PageKeyedDataSource.loadBefore(LoadParams, LoadCallback) and PageKeyedDataSource.loadAfter(LoadParams, LoadCallback).

Summary

Fields

public final Key key

Load items before/after this key.

public final int requestedLoadSize

Requested number of items to load.

Public constructors

PageKeyedDataSource.LoadParams(Key key, int requestedLoadSize)

Inherited methods

Fields

key

added in version 2.0.0
public final Key key

Load items before/after this key.

Returned data must begin directly adjacent to this position.

requestedLoadSize

added in version 2.0.0
public final int requestedLoadSize

Requested number of items to load.

Returned page can be of this size, but it may be altered if that is easier, e.g. a network data source where the backend defines page size.

Public constructors

PageKeyedDataSource.LoadParams

added in version 2.0.0
public PageKeyedDataSource.LoadParams (Key key, 
                int requestedLoadSize)

Parameters
key Key

requestedLoadSize int