# ItemKeyedDataSource.LoadInitialParams

Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/ItemKeyedDataSource.jvmAndAndroid.kt+class:androidx.paging.ItemKeyedDataSource.LoadInitialParams) Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- android

  ```
  open class ItemKeyedDataSource.LoadInitialParams<Key : Any>
  ```

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

Holder object for inputs to `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource#loadInitial(androidx.paging.ItemKeyedDataSource.LoadInitialParams)`.

| Parameters |
|---|---|
| `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | Type of data used to query Value types out of the `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |

## Summary

| ### Public constructors |
|---|---|
| `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> [LoadInitialParams](https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadInitialParams#LoadInitialParams(kotlin.Any,kotlin.Int,kotlin.Boolean))( requestedInitialKey: Key?, requestedLoadSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, placeholdersEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadInitialParams#placeholdersEnabled()` **This property is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `Key?` | `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadInitialParams#requestedInitialKey()` **This property is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadInitialParams#requestedLoadSize()` **This property is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |

## Public constructors

### LoadInitialParams

android

```
<Key : Any> [LoadInitialParams](https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadInitialParams#LoadInitialParams(kotlin.Any,kotlin.Int,kotlin.Boolean))(
    requestedInitialKey: Key?,
    requestedLoadSize: Int,
    placeholdersEnabled: Boolean
)
```

> [!CAUTION]
> **This function is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

| Parameters |
|---|---|
| `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | Type of data used to query Value types out of the `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |
| `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: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Requested number of items to load. Note that this may be larger than available data. |
| `placeholdersEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Defines whether placeholders are enabled, and whether the loaded total count will be ignored. |

## Public properties

### placeholdersEnabled

android Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
val placeholdersEnabled: Boolean
```

> [!CAUTION]
> **This property is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

Defines whether placeholders are enabled, and whether the loaded total count will be ignored.

### requestedInitialKey

android Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
val requestedInitialKey: Key?
```

> [!CAUTION]
> **This property is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

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

android Added in [2.0.0](https://developer.android.com/jetpack/androidx/releases/paging#2.0.0) Deprecated in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
val requestedLoadSize: Int
```

> [!CAUTION]
> **This property is deprecated.**   
> ItemKeyedDataSource is deprecated and has been replaced by PagingSource, use this instead:
>
> ```kotlin
> PagingSource<Key, Value>
> ```

Requested number of items to load.

Note that this may be larger than available data.