LoadInitialParams

open class LoadInitialParams<Key : Any!>
kotlin.Any
   ↳ androidx.paging.ItemKeyedDataSource.LoadInitialParams

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

Summary

Public constructors
<init>(requestedInitialKey: Key?, requestedLoadSize: Int, placeholdersEnabled: Boolean)

Properties
Boolean

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

Key

Load items around this key, or at the beginning of the data set if null is passed.

Int

Requested number of items to load.

Public constructors

<init>

LoadInitialParams(requestedInitialKey: Key?, requestedLoadSize: Int, placeholdersEnabled: Boolean)

Properties

placeholdersEnabled

val placeholdersEnabled: Boolean

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

requestedInitialKey

val requestedInitialKey: Key

Load items around this key, or at the beginning of the data set if null is passed.

Note that this key is generally a hint, and may be ignored if you want to always load from the beginning.

requestedLoadSize

val requestedLoadSize: Int

Requested number of items to load.

Note that this may be larger than available data.