LoadInitialParams

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

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

Summary

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

Properties
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.

Boolean

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

Public constructors

<init>

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

Properties

requestedInitialKey

@Nullable 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.

placeholdersEnabled

val placeholdersEnabled: Boolean

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