The Android Developer Challenge is back! Submit your idea before December 2.

LoadInitialParams

open class LoadInitialParams
kotlin.Any
   ↳ androidx.paging.PositionalDataSource.LoadInitialParams

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

Summary

Public constructors

<init>(requestedStartPosition: Int, requestedLoadSize: Int, pageSize: Int, placeholdersEnabled: Boolean)

Properties

Int

Defines page size acceptable for return values.

Boolean

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

Int

Requested number of items to load.

Int

Initial load position requested.

Public constructors

<init>

LoadInitialParams(requestedStartPosition: Int, requestedLoadSize: Int, pageSize: Int, placeholdersEnabled: Boolean)

Properties

pageSize

val pageSize: Int

Defines page size acceptable for return values.

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

placeholdersEnabled

val placeholdersEnabled: Boolean

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

requestedLoadSize

val requestedLoadSize: Int

Requested number of items to load.

Note that this may be larger than available data.

requestedStartPosition

val requestedStartPosition: Int

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.