# PagedList.Config

Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagedList.kt+class:androidx.paging.PagedList.Config) 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)

*** ** * ** ***


```
public final class PagedList.Config
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData

Configures how a `https://developer.android.com/reference/androidx/paging/PagedList` loads content from its `https://developer.android.com/reference/androidx/paging/PagingSource`.

Use `https://developer.android.com/reference/androidx/paging/PagedList.Config.Builder` to construct and define custom loading behavior, such as `https://developer.android.com/reference/androidx/paging/PagedList.Config.Builder#setPageSize(kotlin.Int)`, which defines number of items loaded at a time.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/paging/PagedList.Config.Builder` **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData |

| ### Public fields |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/paging/PagedList.Config#enablePlaceholders()` **This field is deprecated.** PagedList is deprecated and has been replaced by PagingData |
| `final int` | `https://developer.android.com/reference/androidx/paging/PagedList.Config#initialLoadSizeHint()` **This field is deprecated.** PagedList is deprecated and has been replaced by PagingData |
| `final int` | `https://developer.android.com/reference/androidx/paging/PagedList.Config#maxSize()` **This field is deprecated.** PagedList is deprecated and has been replaced by PagingData |
| `final int` | `https://developer.android.com/reference/androidx/paging/PagedList.Config#pageSize()` **This field is deprecated.** PagedList is deprecated and has been replaced by PagingData |
| `final int` | `https://developer.android.com/reference/androidx/paging/PagedList.Config#prefetchDistance()` **This field is deprecated.** PagedList is deprecated and has been replaced by PagingData |

## Public fields

### enablePlaceholders

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)

```
public final boolean enablePlaceholders
```

> [!CAUTION]
> **This field is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData

Defines whether the `https://developer.android.com/reference/androidx/paging/PagedList` may display null placeholders, if the `https://developer.android.com/reference/androidx/paging/PagingSource` provides them.

### initialLoadSizeHint

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)

```
public final int initialLoadSizeHint
```

> [!CAUTION]
> **This field is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData

Size hint for initial load of PagedList, often larger than a regular page.

### maxSize

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

```
public final int maxSize
```

> [!CAUTION]
> **This field is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData

Defines the maximum number of items that may be loaded into this pagedList before pages should be dropped.

If set to `https://developer.android.com/reference/androidx/paging/PagedList.Config.Companion#MAX_SIZE_UNBOUNDED()`, pages will never be dropped.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/paging/PagedList.Config.Companion#MAX_SIZE_UNBOUNDED()` |   |
| `https://developer.android.com/reference/androidx/paging/PagedList.Config.Builder#setMaxSize(kotlin.Int)` |   |

### pageSize

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)

```
public final int pageSize
```

> [!CAUTION]
> **This field is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData

Size of each page loaded by the PagedList.

### prefetchDistance

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)

```
public final int prefetchDistance
```

> [!CAUTION]
> **This field is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData

Prefetch distance which defines how far ahead to load.

If this value is set to 50, the paged list will attempt to load 50 items in advance of data that's already been accessed.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/paging/PagedList#loadAround(kotlin.Int)` |   |