added in version 2.0.0
belongs to Maven artifact androidx.paging:paging-common:2.0.0-beta01

PositionalDataSource.LoadInitialParams

public static class PositionalDataSource.LoadInitialParams
extends Object

java.lang.Object
   ↳ androidx.paging.PositionalDataSource.LoadInitialParams


Holder object for inputs to PositionalDataSource.loadInitial(LoadInitialParams, LoadInitialCallback).

Summary

Fields

public final int pageSize

Defines page size acceptable for return values.

public final boolean placeholdersEnabled

Defines whether placeholders are enabled, and whether the total count passed to PositionalDataSource.LoadInitialCallback.onResult(List, int, int) will be ignored.

public final int requestedLoadSize

Requested number of items to load.

public final int requestedStartPosition

Initial load position requested.

Public constructors

PositionalDataSource.LoadInitialParams(int requestedStartPosition, int requestedLoadSize, int pageSize, boolean placeholdersEnabled)

Inherited methods

Fields

pageSize

added in version 2.0.0
public final int pageSize

Defines page size acceptable for return values.

List of items passed to the callback must be an integer multiple of page size.

placeholdersEnabled

added in version 2.0.0
public final boolean placeholdersEnabled

Defines whether placeholders are enabled, and whether the total count passed to PositionalDataSource.LoadInitialCallback.onResult(List, int, int) will be ignored.

requestedLoadSize

added in version 2.0.0
public final int requestedLoadSize

Requested number of items to load.

Note that this may be larger than available data.

requestedStartPosition

added in version 2.0.0
public final int requestedStartPosition

Initial load position requested.

Note that this may not be within the bounds of your data set, it may need to be adjusted before you execute your load.

Public constructors

PositionalDataSource.LoadInitialParams

added in version 2.0.0
public PositionalDataSource.LoadInitialParams (int requestedStartPosition, 
                int requestedLoadSize, 
                int pageSize, 
                boolean placeholdersEnabled)

Parameters
requestedStartPosition int

requestedLoadSize int

pageSize int

placeholdersEnabled boolean