# PagedList

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) 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

  ```
  abstract class PagedList<T : Any> : AbstractList<T>
  ```

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [java.util.AbstractCollection](https://developer.android.com/reference/java/util/AbstractCollection.html) |||
|   | ↳ | [java.util.AbstractList](https://developer.android.com/reference/java/util/AbstractList.html)\<T\> ||
|   |   | ↳ | [androidx.paging.PagedList](https://developer.android.com/reference/kotlin/androidx/paging/PagedList) |

*** ** * ** ***

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

Lazy loading list that pages in immutable content from a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`.

A `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` which loads its data in chunks (pages) from a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. Items can be accessed with `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#get(kotlin.Int)`, and further loading can be triggered with `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#loadAround(kotlin.Int)`. To display a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`, see `https://developer.android.com/reference/kotlin/androidx/paging/PagedListAdapter`, which enables the binding of a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` to a `https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView`.

### Loading Data

All data in a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is loaded from its `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. Creating a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` loads the first chunk of data from the `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` immediately, and should for this reason be done on a background thread. The constructed `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` may then be passed to and used on the UI thread. This is done to prevent passing a list with no loaded content to the UI thread, which should generally not be presented to the user.

A `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` initially presents this first partial load as its content, and expands over time as content is loaded in. When `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#loadAround(kotlin.Int)` is called, items will be loaded in near the passed list index. If placeholder `null`s are present in the list, they will be replaced as content is loaded. If not, newly loaded items will be inserted at the beginning or end of the list.

`https://developer.android.com/reference/kotlin/androidx/paging/PagedList` can present data for an unbounded, infinite scrolling list, or a very large but countable list. Use `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` to control how many items a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` loads, and when.

If you use `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder` to get a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData`, it will initialize `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s on a background thread for you.

### Placeholders

There are two ways that `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` can represent its not-yet-loaded data - with or without `null` placeholders.

With placeholders, the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is always the full size of the data set. `get(N)` returns the `N`th item in the data set, or `null` if it's not yet loaded.

Without `null` placeholders, the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is the sublist of data that has already been loaded. The size of the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is the number of currently loaded items, and `get(N)` returns the `N`th *loaded* item. This is not necessarily the `N`th item in the data set.

Placeholders have several benefits:

- They express the full sized list to the presentation layer (often a `https://developer.android.com/reference/kotlin/androidx/paging/PagedListAdapter`), and so can support scrollbars (without jumping as pages are loaded or dropped) and fast-scrolling to any position, loaded or not.

- They avoid the need for a loading spinner at the end of the loaded list, since the list is always full sized.

They also have drawbacks:

- Your Adapter needs to account for `null` items. This often means providing default values in data you bind to a `https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder`.

- They don't work well if your item views are of different sizes, as this will prevent loading items from cross-fading nicely.

- They require you to count your data set, which can be expensive or impossible, depending on your `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`.

Placeholders are enabled by default, but can be disabled in two ways. They are disabled if the `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` does not count its data set in its initial load, or if `false` is passed to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config.Builder#setEnablePlaceholders(kotlin.Boolean)` when building a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config`.

### Mutability and Snapshots

A `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is *mutable* while loading, or ready to load from its `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. As loads succeed, a mutable `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` will be updated via Runnables on the main thread. You can listen to these updates with a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback`. (Note that androidx.paging .PagedListAdapter will listen to these to signal RecyclerView about the updates/changes).

If a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` attempts to load from an invalid `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`, it will `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#detach()` from the `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`, meaning that it will no longer attempt to load data. It will return true from `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#isImmutable()`, and a new `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` / `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` pair must be created to load further data.

See `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` and `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder` for how new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s are created to represent changed data.

A `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` snapshot is simply an immutable shallow copy of the current state of the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` as a `List`. It will reference the same inner items, and contain the same `null` placeholders, if present.

| Parameters |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | The type of the entries in the list. |

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread abstract class https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData |
| `class https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Builder<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData, which no longer supports constructing snapshots of loaded data manually. |
| `abstract class https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData |
| `class https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData |
| `class https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config.Builder` **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[addWeakCallback](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakCallback(androidx.paging.PagedList.Callback))(callback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback)` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[addWeakCallback](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakCallback(kotlin.collections.List,androidx.paging.PagedList.Callback))(previousSnapshot: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>?, callback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback)` **This function is deprecated.** Dispatching a diff since snapshot created is behavior that can be instead tracked by attaching a Callback to the PagedList that is mutating, and tracking changes since calling PagedList.snapshot(). | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[addWeakLoadStateListener](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakLoadStateListener(kotlin.Function2))(listener: (https://developer.android.com/reference/kotlin/androidx/paging/LoadType, https://developer.android.com/reference/kotlin/androidx/paging/LoadState) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[detach](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#detach())()` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `open operator T?` | `[get](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#get(kotlin.Int))(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[loadAround](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#loadAround(kotlin.Int))(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[removeWeakCallback](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#removeWeakCallback(androidx.paging.PagedList.Callback))(callback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback)` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[removeWeakLoadStateListener](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#removeWeakLoadStateListener(kotlin.Function2))(listener: (https://developer.android.com/reference/kotlin/androidx/paging/LoadType, https://developer.android.com/reference/kotlin/androidx/paging/LoadState) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[retry](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#retry())()` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>` | `[snapshot](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#snapshot())()` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#config()` **This property is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/DataSource<*, T>` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#dataSource()` **This property is deprecated.** DataSource is deprecated and has been replaced by PagingSource. | android |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#isDetached()` **This property is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#isImmutable()` **This property is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#lastKey()` **This property is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#loadedCount()` **This property is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#positionOffset()` **This property is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#size()` **This property is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |

### Inherited functions

From [java.util.AbstractCollection](https://developer.android.com/reference/java/util/AbstractCollection.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[addAll](https://developer.android.com/reference/java/util/AbstractCollection.html#addAll(java.util.Collection&lt;? extends E&gt;))(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull c: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[contains](https://developer.android.com/reference/java/util/AbstractCollection.html#contains(java.lang.Object))(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable o: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[containsAll](https://developer.android.com/reference/java/util/AbstractCollection.html#containsAll(java.util.Collection&lt;?&gt;))(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull c: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isEmpty](https://developer.android.com/reference/java/util/AbstractCollection.html#isEmpty())()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[remove](https://developer.android.com/reference/java/util/AbstractCollection.html#remove(java.lang.Object))(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable o: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[removeAll](https://developer.android.com/reference/java/util/AbstractCollection.html#removeAll(java.util.Collection&lt;?&gt;))(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull c: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[retainAll](https://developer.android.com/reference/java/util/AbstractCollection.html#retainAll(java.util.Collection&lt;?&gt;))(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull c: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` `[toArray](https://developer.android.com/reference/java/util/AbstractCollection.html#toArray())()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>` `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> [toArray](https://developer.android.com/reference/java/util/AbstractCollection.html#toArray(T[]))(a: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[toString](https://developer.android.com/reference/java/util/AbstractCollection.html#toString())()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android From [java.util.AbstractList](https://developer.android.com/reference/java/util/AbstractList.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[add](https://developer.android.com/reference/java/util/AbstractList.html#add(E))(e: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[add](https://developer.android.com/reference/java/util/AbstractList.html#add(int, E))(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[addAll](https://developer.android.com/reference/java/util/AbstractList.html#addAll(int, java.util.Collection&lt;? extends E&gt;))(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, @https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull c: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[clear](https://developer.android.com/reference/java/util/AbstractList.html#clear())()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[equals](https://developer.android.com/reference/java/util/AbstractList.html#equals(java.lang.Object))(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[hashCode](https://developer.android.com/reference/java/util/AbstractList.html#hashCode())()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[indexOf](https://developer.android.com/reference/java/util/AbstractList.html#indexOf(java.lang.Object))(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable o: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterator/index.html<T>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[iterator](https://developer.android.com/reference/java/util/AbstractList.html#iterator())()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[lastIndexOf](https://developer.android.com/reference/java/util/AbstractList.html#lastIndexOf(java.lang.Object))(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable o: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list-iterator/index.html<T>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[listIterator](https://developer.android.com/reference/java/util/AbstractList.html#listIterator())()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list-iterator/index.html<T>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[listIterator](https://developer.android.com/reference/java/util/AbstractList.html#listIterator(int))(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open T` `[removeAt](https://developer.android.com/reference/java/util/AbstractList.html#removeAt(int))(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[removeRange](https://developer.android.com/reference/java/util/AbstractList.html#removeRange(int, int))(fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open operator T` `[set](https://developer.android.com/reference/java/util/AbstractList.html#set(int, E))(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, element: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<T>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[subList](https://developer.android.com/reference/java/util/AbstractList.html#subList(int, int))(fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android From [kotlin.collections.Collection](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html) `open https://developer.android.com/reference/java/util/stream/Stream.html<T>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[parallelStream](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/parallel-stream.html)()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://developer.android.com/reference/java/util/Spliterator.html<T>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[spliterator](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/spliterator.html)()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://developer.android.com/reference/java/util/stream/Stream.html<T>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[stream](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/stream.html)()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>` `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> [toArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/to-array.html)(generator: https://developer.android.com/reference/java/util/function/IntFunction.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android From [kotlin.collections.Iterable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[forEach](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/for-each.html)(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull action: https://developer.android.com/reference/java/util/function/Consumer.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android From [kotlin.collections.List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html) `open T` `[getFirst](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/get-first.html)()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open T` `[getLast](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/get-last.html)()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<T>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
[reversed](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/reversed.html)()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android From [kotlin.collections.MutableCollection](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-collection/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[removeIf](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-collection/remove-if.html)(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull filter: https://developer.android.com/reference/java/util/function/Predicate.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android From [kotlin.collections.MutableList](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addFirst](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/add-first.html)(e: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[addLast](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/add-last.html)(e: T)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open T` `[removeFirst](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/remove-first.html)()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open T` `[removeLast](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/remove-last.html)()`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[replaceAll](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/replace-all.html)(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull operator: https://developer.android.com/reference/java/util/function/UnaryOperator.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sort](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/sort.html)(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNullable c: https://developer.android.com/reference/java/util/Comparator.html<T>)`

**This function is deprecated.** PagedList is deprecated and has been replaced by PagingData
android

### Inherited properties

From [java.util.AbstractList](https://developer.android.com/reference/java/util/AbstractList.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/java/util/AbstractList.html#modCount`

**This property is deprecated.** PagedList is deprecated and has been replaced by PagingData
android

## Public functions

### addWeakCallback

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

```
fun [addWeakCallback](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakCallback(androidx.paging.PagedList.Callback))(callback: PagedList.Callback): Unit
```

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

Adds a callback.

The callback is internally held as weak reference, so `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` doesn't hold a strong reference to its observer, such as a `https://developer.android.com/reference/kotlin/androidx/paging/PagedListAdapter`. If an adapter were held with a strong reference, it would be necessary to clear its `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` observer before it could be GC'd.

| Parameters |
|---|---|
| `callback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` | Callback to dispatch to. |

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

### addWeakCallback

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

```
fun [addWeakCallback](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakCallback(kotlin.collections.List,androidx.paging.PagedList.Callback))(previousSnapshot: List<T>?, callback: PagedList.Callback): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Dispatching a diff since snapshot created is behavior that can be instead tracked by attaching a Callback to the PagedList that is mutating, and tracking changes since calling PagedList.snapshot().

Adds a callback, and issues updates since the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakCallback(kotlin.collections.List,androidx.paging.PagedList.Callback)` was created.

If `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakCallback(kotlin.collections.List,androidx.paging.PagedList.Callback)` is passed, the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakCallback(kotlin.collections.List,androidx.paging.PagedList.Callback)` will also immediately be dispatched any differences between the previous snapshot, and the current state. For example, if the previousSnapshot was of 5 nulls, 10 items, 5 nulls, and the current state was 5 nulls, 12 items, 3 nulls, the callback would immediately receive a call of`onChanged(14, 2)`.

This allows an observer that's currently presenting a snapshot to catch up to the most recent version, including any changes that may have been made.

The callback is internally held as weak reference, so `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` doesn't hold a strong reference to its observer, such as a `https://developer.android.com/reference/kotlin/androidx/paging/PagedListAdapter`. If an adapter were held with a strong reference, it would be necessary to clear its `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` observer before it could be GC'd.

| Parameters |
|---|---|
| `previousSnapshot: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>?` | Snapshot previously captured from this List, or `null`. |
| `callback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` to dispatch to. |

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

### addWeakLoadStateListener

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

```
fun [addWeakLoadStateListener](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakLoadStateListener(kotlin.Function2))(listener: (LoadType, LoadState) -> Unit): Unit
```

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

Add a listener to observe the loading state of the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`.

| Parameters |
|---|---|
| `listener: (https://developer.android.com/reference/kotlin/androidx/paging/LoadType, https://developer.android.com/reference/kotlin/androidx/paging/LoadState) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Listener to receive updates. |

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

### detach

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)

```
abstract fun [detach](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#detach())(): Unit
```

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

Detach the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` from its `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`, and attempt to load no more data.

This is called automatically when a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` is observed to be invalid, which is a signal to stop loading. The `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` will continue to present existing data, but will not initiate new loads.

### get

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)

```
open operator fun [get](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#get(kotlin.Int))(index: Int): T?
```

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

Get the item in the list of loaded items at the provided index.

| Parameters |
|---|---|
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Index in the loaded item list. Must be \>= 0, and \<`https://developer.android.com/reference/kotlin/androidx/paging/PagedList#size()` |

| Returns |
|---|---|
| `T?` | The item at the passed index, or `null` if a `null` placeholder is at the specified position. |

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

### loadAround

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)

```
fun [loadAround](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#loadAround(kotlin.Int))(index: Int): Unit
```

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

Load adjacent items to passed index.

| Parameters |
|---|---|
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Index at which to load. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if index is not within bounds. |

### removeWeakCallback

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)

```
fun [removeWeakCallback](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#removeWeakCallback(androidx.paging.PagedList.Callback))(callback: PagedList.Callback): Unit
```

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

Removes a previously added callback.

| Parameters |
|---|---|
| `callback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` | Callback, previously added. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakCallback(kotlin.collections.List,androidx.paging.PagedList.Callback)` |   |

### removeWeakLoadStateListener

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

```
fun [removeWeakLoadStateListener](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#removeWeakLoadStateListener(kotlin.Function2))(listener: (LoadType, LoadState) -> Unit): Unit
```

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

Remove a previously registered load state listener.

| Parameters |
|---|---|
| `listener: (https://developer.android.com/reference/kotlin/androidx/paging/LoadType, https://developer.android.com/reference/kotlin/androidx/paging/LoadState) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Previously registered listener. |

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

### retry

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

```
open fun [retry](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#retry())(): Unit
```

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

Retry any errors associated with this `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`.

If for example a network `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` append timed out, calling this method will retry the failed append load.

You can observe loading state via `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#addWeakLoadStateListener(kotlin.Function2)`, though generally this is done through the `https://developer.android.com/reference/kotlin/androidx/paging/PagedListAdapter` or `https://developer.android.com/reference/kotlin/androidx/paging/AsyncPagedListDiffer`.

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

### snapshot

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)

```
fun [snapshot](https://developer.android.com/reference/kotlin/androidx/paging/PagedList#snapshot())(): List<T>
```

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

Returns an immutable snapshot of the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` in its current state.

If this is immutable`https://developer.android.com/reference/kotlin/androidx/paging/PagedList#isImmutable()` due to its `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` being invalid, it will be returned.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T>` | Immutable snapshot of `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` data. |

## Public properties

### config

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 config: PagedList.Config
```

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

Return the Config used to construct this PagedList.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | the Config of this PagedList |

### dataSource

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 dataSource: DataSource<*, T>
```

> [!CAUTION]
> **This property is deprecated.**   
> DataSource is deprecated and has been replaced by PagingSource. PagedList offers indirect ways of controlling fetch ('loadAround()', 'retry()') so that you should not need to access the DataSource/PagingSource.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` was instantiated without a wrapping a backing `https://developer.android.com/reference/kotlin/androidx/paging/DataSource` |

### isDetached

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)

```
abstract val isDetached: Boolean
```

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

True if the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` has detached the `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` it was loading from, and will no longer load new data.

A detached list is `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#isImmutable()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the data source is detached. |

### isImmutable

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)

```
open val isImmutable: Boolean
```

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

Returns whether the list is immutable.

Immutable lists may not become mutable again, and may safely be accessed from any thread.

In the future, this method may return true when a PagedList has completed loading from its `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. Currently, it is equivalent to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#isDetached()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is immutable. |

### lastKey

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)

```
abstract val lastKey: Any?
```

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

Return the key for the position passed most recently to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#loadAround(kotlin.Int)`.

When a PagedList is invalidated, you can pass the key returned by this function to initialize the next PagedList. This ensures (depending on load times) that the next PagedList that arrives will have data that overlaps. If you use androidx.paging.LivePagedListBuilder, it will do this for you.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | Key of position most recently passed to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#loadAround(kotlin.Int)`. |

### loadedCount

android 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)

```
val loadedCount: Int
```

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

Returns the number of items loaded in the `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`.

Unlike `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#size()` this counts only loaded items, not placeholders.

If placeholders are `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config#enablePlaceholders()`, this method is equivalent to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#size()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Number of items currently loaded, not counting placeholders. |

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

### positionOffset

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 positionOffset: Int
```

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

Position offset of the data in the list.

If the PagingSource backing this PagedList is counted, the item returned from `get(i)` has a position in the original data set of `i + getPositionOffset()`.

If placeholders are enabled, this value is always `0`, since `get(i)` will return either the data in its original index, or null if it is not loaded.

### size

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

```
open val size: Int
```

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

Size of the list, including any placeholders (not-yet-loaded null padding).

To get the number of loaded items, not counting placeholders, use `https://developer.android.com/reference/kotlin/androidx/paging/PagedList#loadedCount()`.

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