# androidx.paging

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript

## Interfaces

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/AsyncPagedListDiffer.PagedListListener` | **This interface is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/DataSource.InvalidatedCallback` | Invalidation callback for `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/Logger` | **This interface is deprecated.** Logger interface is no longer supported. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSourceFactory` | Interface for a factory that generates `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. | Cmn android N JS |
| `https://developer.android.com/reference/kotlin/androidx/paging/PlaceholderPaddedList` | Interface to paged list that could contain placeholders. | Cmn |

## Classes

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/AdjacentItems` | Represents a pair of adjacent items, null values are used to signal boundary conditions. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/AsyncPagedListDiffer` | **This class is deprecated.** AsyncPagedListDiffer is deprecated and has been replaced by AsyncPagingDataDiffer | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/AsyncPagingDataDiffer` | Helper class for mapping a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` into a `https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter`. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/CombinedLoadStates` | Collection of pagination `https://developer.android.com/reference/kotlin/androidx/paging/LoadState`s for both a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`, and `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/DataSource` | Base class for loading pages of snapshot data into a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory` | Factory for DataSources. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/InvalidatingPagingSourceFactory` | Wrapper class for a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` factory intended for usage in `https://developer.android.com/reference/kotlin/androidx/paging/Pager` construction. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource` | **This class is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadCallback` | **This class is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadInitialCallback` | **This class is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadInitialParams` | **This class is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadParams` | **This class is deprecated.** ItemKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/ItemSnapshotList` | Snapshot of data being presented by a androidx.pagingAsyncPagingDataDiffer or a androidx.paging.PagingDataAdapter. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/ListenableFuturePagingSource` | `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`-based compatibility wrapper around `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`'s suspending APIs. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/ListenableFutureRemoteMediator` | `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`-based compatibility wrapper around `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator`'s suspending APIs. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder` | **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadState` | LoadState of a PagedList load - associated with a `https://developer.android.com/reference/kotlin/androidx/paging/LoadType` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.Error` | Loading hit an error. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.NotLoading` | Indicates the `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` is not currently loading, and no error currently observed. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadStateAdapter` | Adapter for displaying a RecyclerView item based on `https://developer.android.com/reference/kotlin/androidx/paging/LoadState`, such as a loading spinner, or a retry error button. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadStates` | Collection of pagination `https://developer.android.com/reference/kotlin/androidx/paging/LoadState`s - refresh, prepend, and append. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource` | **This class is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource.LoadCallback` | **This class is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource.LoadInitialCallback` | **This class is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource.LoadInitialParams` | **This class is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PageKeyedDataSource.LoadParams` | **This class is deprecated.** PageKeyedDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` | **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback` | **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Builder` | **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData, which no longer supports constructing snapshots of loaded data manually. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` | **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config.Builder` | **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedListAdapter` | **This class is deprecated.** PagedListAdapter is deprecated and has been replaced by PagingDataAdapter | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/Pager` | Primary entry point into Paging; constructor for a reactive stream of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingConfig` | An object used to configure loading behavior within a `https://developer.android.com/reference/kotlin/androidx/paging/Pager`, as it loads content from a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` | Container for Paged data from a single generation of loads. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataAdapter` | `https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter` base class for presenting paged data from `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`s in a `https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView`. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataEvent` | Events captured from a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` that was submitted to the `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataPresenter` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataEvent.Append` | An append load event | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataEvent.DropAppend` | A drop event from the end of the list | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataEvent.DropPrepend` | A drop event from the front of the list | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataEvent.Prepend` | A prepend load event | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataEvent.Refresh` | A refresh load event | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingDataPresenter` | The class that connects the UI layer to the underlying Paging operations. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` | Base class for an abstraction of pageable static data from some source, where loading pages of data is typically an expensive operation. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams` | Params for a load request on a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Append` | Params to load a page of data from a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` via `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)` to be appended to the end of the list. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Prepend` | Params to load a page of data from a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` via `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)` to be prepended to the start of the list. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Refresh` | Params for an initial load request on a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)` or a refresh triggered by `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#invalidate()`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult` | Result of a load request from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Error` | Error result object for `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Invalid` | Invalid result object for `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page` | Success result object for `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingState` | Snapshot state of Paging system including the loaded `https://developer.android.com/reference/kotlin/androidx/paging/PagingState#pages()`, the last accessed `https://developer.android.com/reference/kotlin/androidx/paging/PagingState#anchorPosition()`, and the `https://developer.android.com/reference/kotlin/androidx/paging/PagingState#config()` used. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PositionalDataSource` | **This class is deprecated.** PositionalDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PositionalDataSource.LoadInitialCallback` | **This class is deprecated.** PositionalDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PositionalDataSource.LoadInitialParams` | **This class is deprecated.** PositionalDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PositionalDataSource.LoadRangeCallback` | **This class is deprecated.** PositionalDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PositionalDataSource.LoadRangeParams` | **This class is deprecated.** PositionalDataSource is deprecated and has been replaced by PagingSource | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator` | Defines a set of callbacks used to incrementally load data from a remote source into a local source wrapped by a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`, e.g., loading data from network into a local db cache. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator.MediatorResult` | Return type of `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator#load(androidx.paging.LoadType,androidx.paging.PagingState)`, which determines `https://developer.android.com/reference/kotlin/androidx/paging/LoadState`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator.MediatorResult.Error` | Recoverable error that can be retried, sets the `https://developer.android.com/reference/kotlin/androidx/paging/LoadState` to `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.Error`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator.MediatorResult.Success` | Success signaling that `https://developer.android.com/reference/kotlin/androidx/paging/LoadState` should be set to `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.NotLoading` if `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator.MediatorResult.Success#endOfPaginationReached()` is `true`, otherwise `https://developer.android.com/reference/kotlin/androidx/paging/LoadState` is kept at `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.Loading` to await invalidation. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` | **This class is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |

## Objects

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.Loading` | Loading is in progress. | Cmn |

## Annotations

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/ExperimentalPagingApi` | Marks experimental Paging APIs, which may have known issues that would likely be solved by a source-incompatible change in newer versions of the artifact that supplies it. | Cmn |

## Enums

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadType` | Type of load a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` can trigger a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` to perform. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator.InitializeAction` | Return type of `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator#initialize()`, which signals the action to take after `https://developer.android.com/reference/kotlin/androidx/paging/RemoteMediator#initialize()` completes. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType` | Mode for configuring when terminal separators (header and footer) would be displayed by the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparators(androidx.paging.TerminalSeparatorType,kotlin.coroutines.SuspendFunction2)`, `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertHeaderItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` or `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertFooterItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` operators on `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`. | Cmn |

## Top-level functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#Config(kotlin.Int,kotlin.Int,kotlin.Boolean,kotlin.Int,kotlin.Int)( pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, prefetchDistance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, enablePlaceholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, initialLoadSizeHint: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, maxSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Constructs a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config.Builder`. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> [PagedList](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#PagedList(androidx.paging.DataSource,androidx.paging.PagedList.Config,java.util.concurrent.Executor,java.util.concurrent.Executor,androidx.paging.PagedList.BoundaryCallback,kotlin.Any))( dataSource: https://developer.android.com/reference/kotlin/androidx/paging/DataSource<Key, Value>, config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config, notifyExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html, fetchExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, initialKey: Key? )` **This function is deprecated.** DataSource is deprecated and has been replaced by PagingSource | android |

## Extension functions summary

|---|---|---|
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://developer.android.com/reference/kotlin/androidx/paging/ItemSnapshotList<T>>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlinx.coroutines.flow.Flow).asItemSnapshotListFlow(kotlin.Function1)( onLoadError: (https://developer.android.com/reference/kotlin/androidx/paging/CombinedLoadStates) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Converts a Flow of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` into a Flow of `https://developer.android.com/reference/kotlin/androidx/paging/ItemSnapshotList`. | Cmn |
| `suspend https://developer.android.com/reference/kotlin/androidx/paging/CombinedLoadStates?` | `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://developer.android.com/reference/kotlin/androidx/paging/CombinedLoadStates>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlinx.coroutines.flow.Flow).awaitNotLoading()()` Function to wait on a Flow until a load has completed. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(androidx.lifecycle.Lifecycle)(lifecycle: https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle)` Operator which caches a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` within the scope of a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle`. | android |
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlinx.coroutines.flow.Flow).cachedIn(kotlinx.coroutines.CoroutineScope)(scope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html)` Caches the `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` such that any downstream collection from this flow will share the same `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(kotlinx.coroutines.CoroutineScope)(scope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html)` Operator which caches a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` within a `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html`. | android |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(androidx.lifecycle.ViewModel)(viewModel: https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModel)` Operator which caches a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` within the scope of a `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModel`. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filter(kotlin.coroutines.SuspendFunction1)(predicate: suspend (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing only elements matching the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filter(kotlin.coroutines.SuspendFunction1)` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filter(java.util.concurrent.Executor,kotlin.Function1)(executor: https://developer.android.com/reference/java/util/concurrent/Executor.html, predicate: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing only elements matching the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filter(java.util.concurrent.Executor,kotlin.Function1)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filterAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)( predicate: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<T, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>, executor: https://developer.android.com/reference/java/util/concurrent/Executor.html )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing only elements matching the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filterAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMap(kotlin.coroutines.SuspendFunction1)(transform: suspend (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<R>)` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` of all elements returned from applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMap(kotlin.coroutines.SuspendFunction1)` to each element, as it is loaded. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMap(java.util.concurrent.Executor,kotlin.Function1)( executor: https://developer.android.com/reference/java/util/concurrent/Executor.html, transform: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<R> )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` of all elements returned from applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMap(java.util.concurrent.Executor,kotlin.Function1)` to each element, as it is loaded. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)( transform: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<T, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<R>>, executor: https://developer.android.com/reference/java/util/concurrent/Executor.html )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` of all elements returned from applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)` to each element, as it is loaded. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertFooterItem(androidx.paging.TerminalSeparatorType,kotlin.Any)( terminalSeparatorType: https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType, item: T )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with the passed footer `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertFooterItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` added to the end of the list. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertHeaderItem(androidx.paging.TerminalSeparatorType,kotlin.Any)( terminalSeparatorType: https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType, item: T )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with the passed header `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertHeaderItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` added to the start of the list. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<T : R, R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparators(androidx.paging.TerminalSeparatorType,kotlin.coroutines.SuspendFunction2)( terminalSeparatorType: https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType, generator: suspend (T?, T?) -> R? )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with an optional separator generated by `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparators(androidx.paging.TerminalSeparatorType,kotlin.coroutines.SuspendFunction2)`, given the elements before and after (or null, in boundary conditions). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, T : R> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparators(androidx.paging.TerminalSeparatorType,java.util.concurrent.Executor,kotlin.Function2)( terminalSeparatorType: https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType, executor: https://developer.android.com/reference/java/util/concurrent/Executor.html, generator: (T?, T?) -> R? )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with an optional separator generated by `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparators(androidx.paging.TerminalSeparatorType,java.util.concurrent.Executor,kotlin.Function2)`, given the elements before and after (or null, in boundary conditions). | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<T : R, R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparatorsAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)( generator: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<https://developer.android.com/reference/kotlin/androidx/paging/AdjacentItems<T>, R?>, executor: https://developer.android.com/reference/java/util/concurrent/Executor.html )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with an optional separator generated by `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparatorsAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)`, given the elements before and after (or null, in boundary conditions). | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).map(kotlin.coroutines.SuspendFunction1)(transform: suspend (T) -> R)` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing the result of applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).map(kotlin.coroutines.SuspendFunction1)` to each element, as it is loaded. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).map(java.util.concurrent.Executor,kotlin.Function1)(executor: https://developer.android.com/reference/java/util/concurrent/Executor.html, transform: (T) -> R)` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing the result of applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).map(java.util.concurrent.Executor,kotlin.Function1)` to each element, as it is loaded. | android |
| `https://developer.android.com/reference/kotlin/androidx/paging/PagingData<R>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingData<T>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).mapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)( transform: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<T, R>, executor: https://developer.android.com/reference/java/util/concurrent/Executor.html )` Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing the result of applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).mapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)` to each element, as it is loaded. | android |
| `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory<Key, Value>.[toFlowable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy))( config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, backpressureStrategy: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> () -> https://developer.android.com/reference/kotlin/androidx/paging/PagingSource<Key, Value>.[toFlowable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy))( config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, backpressureStrategy: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory<Key, Value>.[toFlowable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy))( pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, backpressureStrategy: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> () -> https://developer.android.com/reference/kotlin/androidx/paging/PagingSource<Key, Value>.[toFlowable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toFlowable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy))( pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, backpressureStrategy: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory<Key, Value>.[toLiveData](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toLiveData(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor))( config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory<Key, Value>.[toLiveData](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toLiveData(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor))( pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> () -> https://developer.android.com/reference/kotlin/androidx/paging/PagingSource<Key, Value>.[toLiveData](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toLiveData(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher))( config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, coroutineScope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html, fetchDispatcher: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> () -> https://developer.android.com/reference/kotlin/androidx/paging/PagingSource<Key, Value>.[toLiveData](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toLiveData(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher))( pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, coroutineScope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html, fetchDispatcher: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory<Key, Value>.[toObservable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler))( config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> () -> https://developer.android.com/reference/kotlin/androidx/paging/PagingSource<Key, Value>.[toObservable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler))( config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory<Key, Value>.[toObservable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler))( pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |
| `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html<https://developer.android.com/reference/kotlin/androidx/paging/PagedList<Value>>` | `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> () -> https://developer.android.com/reference/kotlin/androidx/paging/PagingSource<Key, Value>.[toObservable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toObservable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler))( pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialLoadKey: Key?, boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>?, fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html?, notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? )` **This function is deprecated.** PagedList is deprecated and has been replaced by PagingData | android |

## Extension properties summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/paging/PagingData<Value>>` | `https://developer.android.com/reference/kotlin/androidx/paging/Pager<Key, Value>.https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.Pager).liveData()` A `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`, which mirrors the stream provided by `https://developer.android.com/reference/kotlin/androidx/paging/Pager#flow()`, but exposes it as a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData`. | android |

## Top-level functions

### Config

android Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagedListConfig.kt+function:Config) Added in [3.1.0](https://developer.android.com/jetpack/androidx/releases/paging#3.1.0)

```
fun Config(
    pageSize: Int,
    prefetchDistance: Int = pageSize,
    enablePlaceholders: Boolean = true,
    initialLoadSizeHint: Int = pageSize * PagedList.Config.Builder.DEFAULT_INITIAL_PAGE_MULTIPLIER,
    maxSize: Int = PagedList.Config.MAX_SIZE_UNBOUNDED
): PagedList.Config
```

Constructs a `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config.Builder`.

| Parameters |
|---|---|
| `pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Number of items loaded at once from the `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |
| `prefetchDistance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = pageSize` | Distance the PagedList should prefetch. |
| `enablePlaceholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | False if null placeholders should be disabled. |
| `initialLoadSizeHint: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = pageSize * PagedList.Config.Builder.DEFAULT_INITIAL_PAGE_MULTIPLIER` | Number of items to load while initializing the PagedList. |
| `maxSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = PagedList.Config.MAX_SIZE_UNBOUNDED` | Maximum number of items to keep in memory, or `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config.Companion#MAX_SIZE_UNBOUNDED()` to disable page dropping. |

### PagedList

android 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+function:PagedList) Added in [3.1.0](https://developer.android.com/jetpack/androidx/releases/paging#3.1.0) Deprecated in [3.1.0](https://developer.android.com/jetpack/androidx/releases/paging#3.1.0)

```
fun <Key : Any, Value : Any> [PagedList](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#PagedList(androidx.paging.DataSource,androidx.paging.PagedList.Config,java.util.concurrent.Executor,java.util.concurrent.Executor,androidx.paging.PagedList.BoundaryCallback,kotlin.Any))(
    dataSource: DataSource<Key, Value>,
    config: PagedList.Config,
    notifyExecutor: Executor,
    fetchExecutor: Executor,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    initialKey: Key? = null
): PagedList<Value>
```

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

Constructs a `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#PagedList(androidx.paging.DataSource,androidx.paging.PagedList.Config,java.util.concurrent.Executor,java.util.concurrent.Executor,androidx.paging.PagedList.BoundaryCallback,kotlin.Any)`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Builder`.

| Parameters |
|---|---|
| `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | Type of key used to load data from the `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |
| `<Value : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | Type of items held and loaded by the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#PagedList(androidx.paging.DataSource,androidx.paging.PagedList.Config,java.util.concurrent.Executor,java.util.concurrent.Executor,androidx.paging.PagedList.BoundaryCallback,kotlin.Any)`. |
| `dataSource: https://developer.android.com/reference/kotlin/androidx/paging/DataSource<Key, Value>` | `https://developer.android.com/reference/kotlin/androidx/paging/DataSource` the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#PagedList(androidx.paging.DataSource,androidx.paging.PagedList.Config,java.util.concurrent.Executor,java.util.concurrent.Executor,androidx.paging.PagedList.BoundaryCallback,kotlin.Any)` will load from. |
| `config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | Config that defines how the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#PagedList(androidx.paging.DataSource,androidx.paging.PagedList.Config,java.util.concurrent.Executor,java.util.concurrent.Executor,androidx.paging.PagedList.BoundaryCallback,kotlin.Any)` loads data from its `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |
| `notifyExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/java/util/concurrent/Executor.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#PagedList(androidx.paging.DataSource,androidx.paging.PagedList.Config,java.util.concurrent.Executor,java.util.concurrent.Executor,androidx.paging.PagedList.BoundaryCallback,kotlin.Any)` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI/main thread. |
| `fetchExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/java/util/concurrent/Executor.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback` for listening to out-of-data events. |
| `initialKey: Key? = null` | `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#PagedList(androidx.paging.DataSource,androidx.paging.PagedList.Config,java.util.concurrent.Executor,java.util.concurrent.Executor,androidx.paging.PagedList.BoundaryCallback,kotlin.Any)` the `https://developer.android.com/reference/kotlin/androidx/paging/DataSource` should load around as part of initialization. |

## Extension functions

### Flow.asItemSnapshotListFlow

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/ItemSnapshotListFlow.kt+function:asItemSnapshotListFlow) Added in [3.5.3](https://developer.android.com/jetpack/androidx/releases/paging#3.5.3)

```
fun <T : Any> Flow<PagingData<T>>.asItemSnapshotListFlow(
    onLoadError: (CombinedLoadStates) -> Unit = {}
): Flow<ItemSnapshotList<T>>
```

Converts a Flow of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` into a Flow of `https://developer.android.com/reference/kotlin/androidx/paging/ItemSnapshotList`. An emitted `https://developer.android.com/reference/kotlin/androidx/paging/ItemSnapshotList` contains a snapshot of all loaded data and can be cached for repeated reads.

To reflect the latest snapshot, this flow emits a new `https://developer.android.com/reference/kotlin/androidx/paging/ItemSnapshotList` whenever new items are loaded or whenever loaded items are dropped (i.e. to fulfill `https://developer.android.com/reference/kotlin/androidx/paging/PagingConfig#maxSize()`).

The flow is kept active as long as the collection scope is active. To avoid leaks, make sure to use a scope that is already managed (like a ViewModel scope) or manually cancel it when you don't need paging anymore.

To use this flow with multiple collectors, convert it to a SharedFlow with Flow operators such as stateIn() or sharedIn().

Note that this Flow remains as a cold flow and does not start any loading until collected upon.

`https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlinx.coroutines.flow.Flow).asItemSnapshotListFlow(kotlin.Function1)` - the paged item type

```kotlin
import androidx.compose.foundation.lazy.items
import androidx.lifecycle.ViewModel
import androidx.paging.ItemSnapshotList
import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.PagingSource
import androidx.paging.asItemSnapshotListFlow

lateinit var pagingSourceFactory: () -> PagingSource<String, SampleData.Item>

/** Initialize Pager in ViewModel */
val pager =
    Pager(config = PagingConfig(pageSize = 40), pagingSourceFactory = pagingSourceFactory)

val itemsFlow = pager.flow.asItemSnapshotListFlow()
```

```kotlin
import androidx.compose.foundation.lazy.items
import androidx.lifecycle.ViewModel
import androidx.paging.ItemSnapshotList
import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.PagingSource
import androidx.paging.asItemSnapshotListFlow
import androidx.paging.insertSeparators

lateinit var pagingSourceFactory: () -> PagingSource<String, SampleData.Item>

/** Initialize Pager in ViewModel */
val pager =
    Pager(config = PagingConfig(pageSize = 40), pagingSourceFactory = pagingSourceFactory)

val itemsFlow: Flow<ItemSnapshotList<SampleData>> =
    pager.flow
        /**
         * To improve performance, apply mapping and transformations on [Pager.flow] before
         * calling asState() to ensure that transforms are executed incrementally on newly
         * loaded data.
         */
        .map { pagingData ->
            pagingData.insertSeparators { _, next ->
                if (next?.value?.rem(10) == 0) SampleData.Separator(next.value.toString())
                else null
            }
        }
        .asItemSnapshotListFlow()
```

```kotlin
import androidx.compose.foundation.lazy.items
import androidx.lifecycle.ViewModel
import androidx.paging.ItemSnapshotList
import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.PagingSource
import androidx.paging.asItemSnapshotListFlow

lateinit var pagingSourceFactory: () -> PagingSource<String, SampleData.Item>

/** Initialize Pager in ViewModel */
val pager =
    Pager(config = PagingConfig(pageSize = 40), pagingSourceFactory = pagingSourceFactory)
val itemsFlow =
    pager.flow.asItemSnapshotListFlow { _ ->
        /** Retries the failed load without invalidating the PagingSource */
        pager.retry()
    }
```

| Parameters |
|---|---|
| `onLoadError: (https://developer.android.com/reference/kotlin/androidx/paging/CombinedLoadStates) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html = {}` | the callback invoked when any loads return `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.Error`. Provides the `https://developer.android.com/reference/kotlin/androidx/paging/CombinedLoadStates` containing the error. No-op by default. See `https://developer.android.com/reference/kotlin/androidx/paging/Pager#retry()` for a recovery option. |

### Flow.awaitNotLoading

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/CombinedLoadStates.kt+function:awaitNotLoading)

```
suspend fun Flow<CombinedLoadStates>.awaitNotLoading(): CombinedLoadStates?
```

Function to wait on a Flow until a load has completed.

It collects on the Flow and suspends until it collects and returns the firstOrNull `https://developer.android.com/reference/kotlin/androidx/paging/CombinedLoadStates` where all `https://developer.android.com/reference/kotlin/androidx/paging/LoadStates` have settled into a non-loading state i.e. `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.NotLoading` or `https://developer.android.com/reference/kotlin/androidx/paging/LoadState.Error`.

A use case could be scrolling to a position after refresh has completed:

```kotlin
override fun onCreate(savedInstanceState: Bundle?) {
    ...
    refreshButton.setOnClickListener {
        pagingAdapter.refresh()
        lifecycleScope.launch {
            // wait for refresh to complete
            pagingAdapter.loadStateFlow.awaitNotLoading()
            // do work after refresh
            recyclerView.scrollToPosition(position)
        }
   }
}
```

### LiveData.cachedIn

android Artifact: [androidx.paging:paging-runtime](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingLiveData.kt+function:cachedIn) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any> LiveData<PagingData<T>>.cachedIn(lifecycle: Lifecycle): LiveData<PagingData<T>>
```

Operator which caches a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` within the scope of a `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle`.

`https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(androidx.lifecycle.Lifecycle)` multicasts pages loaded and transformed by a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`, allowing multiple observers on the same instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` to receive the same events, avoiding redundant work, but comes at the cost of buffering those pages in memory.

Calling `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(androidx.lifecycle.Lifecycle)` is required to allow calling androidx.paging.AsyncPagingDataAdapter on the same instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` emitted by `https://developer.android.com/reference/kotlin/androidx/paging/Pager` or any of its transformed derivatives, as reloading data from scratch on the same generation of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` is an unsupported operation.

| Parameters |
|---|---|
| `lifecycle: https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` | The `https://developer.android.com/reference/kotlin/androidx/lifecycle/Lifecycle` where the page cache will be kept alive. |

### Flow.cachedIn

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/CachedPagingData.kt+function:cachedIn) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any> Flow<PagingData<T>>.cachedIn(scope: CoroutineScope): Flow<PagingData<T>>
```

Caches the `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` such that any downstream collection from this flow will share the same `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`.

The flow is kept active as long as the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlinx.coroutines.flow.Flow).cachedIn(kotlinx.coroutines.CoroutineScope)` is active. To avoid leaks, make sure to use a `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlinx.coroutines.flow.Flow).cachedIn(kotlinx.coroutines.CoroutineScope)` that is already managed (like a ViewModel scope) or manually cancel it when you don't need paging anymore.

A common use case for this caching is to cache `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` in a ViewModel. This can ensure that, upon configuration change (e.g. rotation), then new Activity will receive the existing data immediately rather than fetching it from scratch.

Calling `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlinx.coroutines.flow.Flow).cachedIn(kotlinx.coroutines.CoroutineScope)` is required to allow calling androidx.paging.AsyncPagingDataAdapter on the same instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` emitted by `https://developer.android.com/reference/kotlin/androidx/paging/Pager` or any of its transformed derivatives, as reloading data from scratch on the same generation of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` is an unsupported operation.

Note that this does not turn the `Flow<PagingData>` into a hot stream. It won't execute any unnecessary code unless it is being collected.

```kotlin
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.ViewModel
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.viewModelScope
import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.cachedIn
import androidx.paging.map

class MyViewModel : ViewModel() {
    val flow =
        Pager(config = PagingConfig(pageSize = 40), pagingSourceFactory = pagingSourceFactory)
            .flow
            // Loads and transformations before the cachedIn operation will be cached, so that
            // multiple observers get the same data. This is true either for simultaneous
            // observers, or e.g. an Activity re-subscribing after being recreated
            .cachedIn(viewModelScope)
}

class MyActivity : AppCompatActivity() {
    val pagingAdapter = MyPagingAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val viewModel by viewModels<MyViewModel>()

        lifecycleScope.launch {
            viewModel.flow
                // Any transformations after the ViewModel's cachedIn step will not be cached,
                // and will instead by re-run immediately on Activity re-creation.
                .map { pagingData ->
                    // example un-cached transformation
                    pagingData.map { UiModel(it) }
                }
                .collectLatest { pagingAdapter.submitData(it) }
        }
    }
}
```

| Parameters |
|---|---|
| `scope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` | The coroutine scope where this page cache will be kept alive. |

### LiveData.cachedIn

android Artifact: [androidx.paging:paging-runtime](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingLiveData.kt+function:cachedIn) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any> LiveData<PagingData<T>>.cachedIn(scope: CoroutineScope): LiveData<PagingData<T>>
```

Operator which caches a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` within a `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html`.

`https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(kotlinx.coroutines.CoroutineScope)` multicasts pages loaded and transformed by a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`, allowing multiple observers on the same instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` to receive the same events, avoiding redundant work, but comes at the cost of buffering those pages in memory.

Calling `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(kotlinx.coroutines.CoroutineScope)` is required to allow calling androidx.paging.AsyncPagingDataAdapter on the same instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` emitted by `https://developer.android.com/reference/kotlin/androidx/paging/Pager` or any of its transformed derivatives, as reloading data from scratch on the same generation of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` is an unsupported operation.

| Parameters |
|---|---|
| `scope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` | The `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` where the page cache will be kept alive. Typically this would be a managed scope such as `ViewModel.viewModelScope`, which automatically cancels after the `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` stream is no longer needed. Otherwise, the provided `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` must be manually cancelled to avoid memory leaks. |

### LiveData.cachedIn

android Artifact: [androidx.paging:paging-runtime](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingLiveData.kt+function:cachedIn) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any> LiveData<PagingData<T>>.cachedIn(viewModel: ViewModel): LiveData<PagingData<T>>
```

Operator which caches a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` within the scope of a `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModel`.

`https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(androidx.lifecycle.ViewModel)` multicasts pages loaded and transformed by a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`, allowing multiple observers on the same instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` to receive the same events, avoiding redundant work, but comes at the cost of buffering those pages in memory.

Calling `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(androidx.lifecycle.ViewModel)` is required to allow calling androidx.paging.AsyncPagingDataAdapter on the same instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` emitted by `https://developer.android.com/reference/kotlin/androidx/paging/Pager` or any of its transformed derivatives, as reloading data from scratch on the same generation of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` is an unsupported operation.

| Parameters |
|---|---|
| `viewModel: https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModel` | The `https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModel` whose `https://developer.android.com/reference/kotlin/androidx/lifecycle/package-summary#(androidx.lifecycle.ViewModel).viewModelScope()` will dictate how long the page cache will be kept alive. |

### PagingData.filter

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.kt+function:filter) Added in [3.1.0](https://developer.android.com/jetpack/androidx/releases/paging#3.1.0)

```
fun <T : Any> PagingData<T>.filter(predicate: suspend (T) -> Boolean): PagingData<T>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing only elements matching the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filter(kotlin.coroutines.SuspendFunction1)`

### PagingData.filter

android Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.jvm.kt+function:filter) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any> PagingData<T>.filter(executor: Executor, predicate: (T) -> Boolean): PagingData<T>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing only elements matching the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filter(java.util.concurrent.Executor,kotlin.Function1)`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filter(java.util.concurrent.Executor,kotlin.Function1)` |   |

### PagingData.filterAsync

android Artifact: [androidx.paging:paging-guava](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/ListenableFuturePagingData.kt+function:filterAsync) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any> PagingData<T>.filterAsync(
    predicate: AsyncFunction<T, Boolean>,
    executor: Executor
): PagingData<T>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing only elements matching the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).filterAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)`.

| Parameters |
|---|---|
| `predicate: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<T, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>` | `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html` returning `false` for unmatched items which should be filtered. |
| `executor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/java/util/concurrent/Executor.html` to run the `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html` in. |

### PagingData.flatMap

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.kt+function:flatMap)

```
fun <T : Any, R : Any> PagingData<T>.flatMap(transform: suspend (T) -> Iterable<R>): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` of all elements returned from applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMap(kotlin.coroutines.SuspendFunction1)` to each element, as it is loaded.

### PagingData.flatMap

android Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.jvm.kt+function:flatMap)

```
fun <T : Any, R : Any> PagingData<T>.flatMap(
    executor: Executor,
    transform: (T) -> Iterable<R>
): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` of all elements returned from applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMap(java.util.concurrent.Executor,kotlin.Function1)` to each element, as it is loaded.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMap(java.util.concurrent.Executor,kotlin.Function1)` |   |

### PagingData.flatMapAsync

android Artifact: [androidx.paging:paging-guava](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/ListenableFuturePagingData.kt+function:flatMapAsync) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any, R : Any> PagingData<T>.flatMapAsync(
    transform: AsyncFunction<T, Iterable<R>>,
    executor: Executor
): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` of all elements returned from applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)` to each element, as it is loaded.

| Parameters |
|---|---|
| `transform: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<T, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<R>>` | `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html` to transform an item of type `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)` a list of items of type `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).flatMapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)`. |
| `executor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/java/util/concurrent/Executor.html` to run the `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html` in. |

### PagingData.insertFooterItem

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.kt+function:insertFooterItem) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any> PagingData<T>.insertFooterItem(
    terminalSeparatorType: TerminalSeparatorType = FULLY_COMPLETE,
    item: T
): PagingData<T>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with the passed footer `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertFooterItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` added to the end of the list.

The footer `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertFooterItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` is added to a loaded page which marks the end of the data stream in the `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#APPEND` direction, either by returning null in `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page#nextKey()`. It will be removed if the last page in the list is dropped, which can happen in the case of loaded pages exceeding `https://developer.android.com/reference/kotlin/androidx/paging/PagingConfig#maxSize()`.

Note: This operation is not idempotent, calling it multiple times will continually add more footers to the end of the list, which can be useful if multiple footer items are required.

| Parameters |
|---|---|
| `terminalSeparatorType: https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType = FULLY_COMPLETE` | `https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType` used to configure when the header and footer are added. |
| `item: T` | The footer to add to the end of the list once it is fully loaded in the `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#APPEND` direction. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertHeaderItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` |   |

### PagingData.insertHeaderItem

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.kt+function:insertHeaderItem) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any> PagingData<T>.insertHeaderItem(
    terminalSeparatorType: TerminalSeparatorType = FULLY_COMPLETE,
    item: T
): PagingData<T>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with the passed header `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertHeaderItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` added to the start of the list.

The header `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertHeaderItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` is added to a loaded page which marks the end of the data stream in the `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#PREPEND` direction by returning null in `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page#prevKey()`. It will be removed if the first page in the list is dropped, which can happen in the case of loaded pages exceeding `https://developer.android.com/reference/kotlin/androidx/paging/PagingConfig#maxSize()`.

Note: This operation is not idempotent, calling it multiple times will continually add more headers to the start of the list, which can be useful if multiple header items are required.

| Parameters |
|---|---|
| `terminalSeparatorType: https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType = FULLY_COMPLETE` | `https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType` used to configure when the header and footer are added. |
| `item: T` | The header to add to the front of the list once it is fully loaded in the `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#PREPEND` direction. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertFooterItem(androidx.paging.TerminalSeparatorType,kotlin.Any)` |   |

### PagingData.insertSeparators

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.kt+function:insertSeparators) Added in [3.1.0](https://developer.android.com/jetpack/androidx/releases/paging#3.1.0)

```
fun <T : R, R : Any> PagingData<T>.insertSeparators(
    terminalSeparatorType: TerminalSeparatorType = FULLY_COMPLETE,
    generator: suspend (T?, T?) -> R?
): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with an optional separator generated by `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparators(androidx.paging.TerminalSeparatorType,kotlin.coroutines.SuspendFunction2)`, given the elements before and after (or null, in boundary conditions).

Note that this transform is applied asynchronously, as pages are loaded. Potential separators between pages are only computed once both pages are loaded.

```kotlin
import androidx.paging.insertSeparators

/*
 * Create letter separators in an alphabetically sorted list.
 *
 * For example, if the input is:
 *     "apple", "apricot", "banana", "carrot"
 *
 * The operator would output:
 *     "A", "apple", "apricot", "B", "banana", "C", "carrot"
 */
pagingDataStream.map { pagingData ->
    // map outer stream, so we can perform transformations on each paging generation
    pagingData.insertSeparators { before: String?, after: String? ->
        if (after != null && before?.first() != after.first()) {
            // separator - after is first item that starts with its first letter
            after.first().uppercaseChar().toString()
        } else {
            // no separator - either end of list, or first letters of before/after are the same
            null
        }
    }
}
```

```kotlin
import androidx.paging.insertSeparators
import androidx.paging.map

open class UiModel
data class ItemUiModel(val item: Item) : UiModel()
data class SeparatorUiModel(val char: Char) : UiModel()

/*
 * Create letter separators in an alphabetically sorted list of Items, with UiModel objects.
 *
 * For example, if the input is (each an `Item`):
 *     "apple", "apricot", "banana", "carrot"
 *
 * The operator would output a list of UiModels corresponding to:
 *     "A", "apple", "apricot", "B", "banana", "C", "carrot"
 */
pagingDataStream.map { pagingData ->
    // map outer stream, so we can perform transformations on each paging generation
    pagingData
        .map { item ->
            ItemUiModel(item) // convert items in stream to ItemUiModel
        }
        .insertSeparators<ItemUiModel, UiModel> { before: ItemUiModel?, after: ItemUiModel? ->
            if (after != null && before?.item?.label?.first() != after.item.label.first()) {
                // separator - after is first item that starts with its first letter
                SeparatorUiModel(after.item.label.first().uppercaseChar())
            } else {
                // no separator - either end of list, or first letters of before/after are the
                // same
                null
            }
        }
}
```

| Parameters |
|---|---|
| `terminalSeparatorType: https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType = FULLY_COMPLETE` | `https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType` used to configure when the header and footer are added. |
| `generator: suspend (T?, T?) -> R?` | Generator function used to construct a separator item given the item before and the item after. For terminal separators (header and footer), the arguments passed to the generator, `before` and `after`, will be `null` respectively. In cases where the fully paginated list is empty, a single separator will be added where both `before` and `after` items are `null`. |

### PagingData.insertSeparators

android Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.jvm.kt+function:insertSeparators) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <R : Any, T : R> PagingData<T>.insertSeparators(
    terminalSeparatorType: TerminalSeparatorType = TerminalSeparatorType.FULLY_COMPLETE,
    executor: Executor,
    generator: (T?, T?) -> R?
): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with an optional separator generated by `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparators(androidx.paging.TerminalSeparatorType,java.util.concurrent.Executor,kotlin.Function2)`, given the elements before and after (or null, in boundary conditions).

Note that this transform is applied asynchronously, as pages are loaded. Potential separators between pages are only computed once both pages are loaded.

**Kotlin callers should instead use the suspending extension function variant of insertSeparators**

```kotlin
/*
 * Create letter separators in an alphabetically sorted list.
 *
 * For example, if the input is:
 *     "apple", "apricot", "banana", "carrot"
 *
 * The operator would output:
 *     "A", "apple", "apricot", "B", "banana", "C", "carrot"
*/
pagingDataStream.map(pagingData ->
        // map outer stream, so we can perform transformations on each paging generation
        PagingDataTransforms.insertSeparators(pagingData, bgExecutor,
                (@Nullable String before, @Nullable String after) -> {
                    if (after != null && (before == null
                            || before.charAt(0) != after.charAt(0))) {
                        // separator - after is first item that starts with its first
                        // letter
                        return Character.toString(
                                Character.toUpperCase(after.charAt(0)));
                    } else {
                        // no separator - either end of list, or first
                        // letters of items are the same
                        return null;
                    }
                }));

/*
 * Create letter separators in an alphabetically sorted list of Items, with UiModel
 * objects.
 *
 * For example, if the input is (each an `Item`):
 *     "apple", "apricot", "banana", "carrot"
 *
 * The operator would output a list of UiModels corresponding to:
 *     "A", "apple", "apricot", "B", "banana", "C", "carrot"
*/
pagingDataStream.map(itemPagingData -> {
    // map outer stream, so we can perform transformations on each paging generation

    // first convert items in stream to UiModel.Item
    PagingData<UiModel.ItemModel> itemModelPagingData = PagingDataTransforms.map(
            itemPagingData, bgExecutor, UiModel.ItemModel::new);

    // Now insert UiModel.Separators, which makes the PagingData of generic type UiModel
    return PagingDataTransforms.insertSeparators(
            itemModelPagingData, bgExecutor,
            (@Nullable UiModel.ItemModel before, @Nullable UiModel.ItemModel after) -> {
                if (after != null && (before == null
                        || before.item.label.charAt(0) != after.item.label.charAt(0))) {
                    // separator - after is first item that starts with its first letter
                    return new UiModel.SeparatorModel(
                            Character.toUpperCase(after.item.label.charAt(0)));
                } else {
                    // no separator - either end of list, or first
                    // letters of items are the same
                    return null;
                }
            });
});

public class UiModel {
    static class ItemModel extends UiModel {
        public Item item;
        ItemModel(Item item) {
            this.item = item;
        }
    }
    static class SeparatorModel extends UiModel {
        public char character;
        SeparatorModel(char character) {
            this.character = character;
        }
    }
}
```

| Parameters |
|---|---|
| `terminalSeparatorType: https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType = TerminalSeparatorType.FULLY_COMPLETE` | `https://developer.android.com/reference/kotlin/androidx/paging/TerminalSeparatorType` used to configure when the header and footer are added. |
| `executor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/java/util/concurrent/Executor.html` to run the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparators(androidx.paging.TerminalSeparatorType,java.util.concurrent.Executor,kotlin.Function2)` function in. |
| `generator: (T?, T?) -> R?` | Generator function used to construct a separator item given the item before and the item after. For terminal separators (header and footer), the arguments passed to the generator, `before` and `after`, will be `null` respectively. In cases where the fully paginated list is empty, a single separator will be added where both `before` and `after` items are `null`. |

### PagingData.insertSeparatorsAsync

android Artifact: [androidx.paging:paging-guava](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/ListenableFuturePagingData.kt+function:insertSeparatorsAsync) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : R, R : Any> PagingData<T>.insertSeparatorsAsync(
    generator: AsyncFunction<AdjacentItems<T>, R?>,
    executor: Executor
): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing each original element, with an optional separator generated by `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).insertSeparatorsAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)`, given the elements before and after (or null, in boundary conditions).

Note that this transform is applied asynchronously, as pages are loaded. Potential separators between pages are only computed once both pages are loaded.

```kotlin
import androidx.paging.AdjacentItems
import androidx.paging.insertSeparators
import androidx.paging.insertSeparatorsAsync
import androidx.paging.rxjava2.insertSeparatorsAsync

/*
 * Create letter separators in an alphabetically sorted list.
 *
 * For example, if the input is:
 *     "apple", "apricot", "banana", "carrot"
 *
 * The operator would output:
 *     "A", "apple", "apricot", "B", "banana", "C", "carrot"
 */
pagingDataStream.map { pagingData ->
    // map outer stream, so we can perform transformations on each paging generation
    pagingData.insertSeparatorsAsync(
        AsyncFunction<AdjacentItems<String>, String?> {
            Futures.submit(
                Callable<String?> {
                    val (before, after) = it!!
                    if (after != null && before?.first() != after.first()) {
                        // separator - after is first item that starts with its first letter
                        after.first().uppercaseChar().toString()
                    } else {
                        // no separator - either end of list, or first letters of before/after
                        // are the same
                        null
                    }
                },
                executor,
            )
        },
        executor,
    )
}
```

```kotlin
import androidx.paging.AdjacentItems
import androidx.paging.insertSeparators
import androidx.paging.insertSeparatorsAsync
import androidx.paging.map
import androidx.paging.rxjava2.insertSeparatorsAsync

open class UiModel
data class ItemUiModel(val item: Item) : UiModel()
data class SeparatorUiModel(val char: Char) : UiModel()

/*
 * Create letter separators in an alphabetically sorted list of Items, with UiModel objects.
 *
 * For example, if the input is (each an `Item`):
 *     "apple", "apricot", "banana", "carrot"
 *
 * The operator would output a list of UiModels corresponding to:
 *     "A", "apple", "apricot", "B", "banana", "C", "carrot"
 */
pagingDataStream.map { pagingData ->
    // map outer stream, so we can perform transformations on each paging generation
    pagingData
        .map { item ->
            ItemUiModel(item) // convert items in stream to ItemUiModel
        }
        .insertSeparatorsAsync(
            AsyncFunction<AdjacentItems<ItemUiModel>, UiModel?> {
                Futures.submit(
                    Callable<UiModel> {
                        val (before, after) = it!!
                        if (
                            after != null &&
                                before?.item?.label?.first() != after.item.label.first()
                        ) {
                            // separator - after is first item that starts with its first letter
                            SeparatorUiModel(after.item.label.first().uppercaseChar())
                        } else {
                            // no separator - either end of list, or first letters of
                            // before/after are the same
                            null
                        }
                    },
                    executor,
                )
            },
            executor,
        )
}
```

| Parameters |
|---|---|
| `generator: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<https://developer.android.com/reference/kotlin/androidx/paging/AdjacentItems<T>, R?>` | `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html` used to generate separator between two `https://developer.android.com/reference/kotlin/androidx/paging/AdjacentItems` or the header or footer if either `https://developer.android.com/reference/kotlin/androidx/paging/AdjacentItems#before()` or `https://developer.android.com/reference/kotlin/androidx/paging/AdjacentItems#after()` is `null`. |
| `executor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/java/util/concurrent/Executor.html` to run the `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html` in. |

### PagingData.map

Cmn Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.kt+function:map) Added in [3.1.0](https://developer.android.com/jetpack/androidx/releases/paging#3.1.0)

```
fun <T : Any, R : Any> PagingData<T>.map(transform: suspend (T) -> R): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing the result of applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).map(kotlin.coroutines.SuspendFunction1)` to each element, as it is loaded.

### PagingData.map

android Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingDataTransforms.jvm.kt+function:map) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any, R : Any> PagingData<T>.map(executor: Executor, transform: (T) -> R): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing the result of applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).map(java.util.concurrent.Executor,kotlin.Function1)` to each element, as it is loaded.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).map(java.util.concurrent.Executor,kotlin.Function1)` |   |

### PagingData.mapAsync

android Artifact: [androidx.paging:paging-guava](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/ListenableFuturePagingData.kt+function:mapAsync) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
fun <T : Any, R : Any> PagingData<T>.mapAsync(
    transform: AsyncFunction<T, R>,
    executor: Executor
): PagingData<R>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` containing the result of applying the given `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).mapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)` to each element, as it is loaded.

| Parameters |
|---|---|
| `transform: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<T, R>` | `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html` to transform an item of type `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).mapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)` to `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.PagingData).mapAsync(com.google.common.util.concurrent.AsyncFunction,java.util.concurrent.Executor)`. |
| `executor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | `https://developer.android.com/reference/java/util/concurrent/Executor.html` to run the `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html` in. |

### DataSource.Factory.toFlowable

android Artifact: [androidx.paging:paging-rxjava2](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/RxPagedList.kt+function:toFlowable) Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/paging#2.1.0)

```
fun <Key : Any, Value : Any> DataSource.Factory<Key, Value>.[toFlowable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy))(
    config: PagedList.Config,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchScheduler: Scheduler? = null,
    notifyScheduler: Scheduler? = null,
    backpressureStrategy: BackpressureStrategy = BackpressureStrategy.LATEST
): Flowable<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(
>                 config.pageSize,
>                 config.prefetchDistance,
>                 config.enablePlaceholders,
>                 config.initialLoadSizeHint,
>                 config.maxSize
>             ),
>             initialLoadKey,
>             this.asPagingSourceFactory(fetchScheduler?.asCoroutineDispatcher() ?: Dispatchers.IO)
>         ).flowable
> ```

Constructs a `Flowable<PagedList>`, from this `https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder`.

The returned `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html` will already be subscribed on the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)`, and will perform all loading on that scheduler. It will already be observed on `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)`, and will dispatch new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s, as well as their updates to that scheduler.

| Parameters |
|---|---|
| `config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | Paging configuration. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI / main thread. |
| `backpressureStrategy: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html = BackpressureStrategy.LATEST` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html` for the `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html` to use. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` |   |
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)` |   |

### () -\> PagingSource.toFlowable

android Artifact: [androidx.paging:paging-rxjava2](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/RxPagedList.kt+function:toFlowable)

```
fun <Key : Any, Value : Any> () -> PagingSource<Key, Value>.[toFlowable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy))(
    config: PagedList.Config,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchScheduler: Scheduler? = null,
    notifyScheduler: Scheduler? = null,
    backpressureStrategy: BackpressureStrategy = BackpressureStrategy.LATEST
): Flowable<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(
>                 config.pageSize,
>                 config.prefetchDistance,
>                 config.enablePlaceholders,
>                 config.initialLoadSizeHint,
>                 config.maxSize
>             ),
>             initialLoadKey,
>             this
>         ).flowable
> ```

Constructs a `Flowable<PagedList>`, from this `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` factory, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder`.

The returned `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html` will already be subscribed on the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)`, and will perform all loading on that scheduler. It will already be observed on `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)`, and will dispatch new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s, as well as their updates to that scheduler.

| Parameters |
|---|---|
| `config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | Paging configuration. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI / main thread. |
| `backpressureStrategy: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html = BackpressureStrategy.LATEST` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html` for the `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html` to use. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` |   |
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)` |   |

### DataSource.Factory.toFlowable

android Artifact: [androidx.paging:paging-rxjava2](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/RxPagedList.kt+function:toFlowable) Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/paging#2.1.0)

```
fun <Key : Any, Value : Any> DataSource.Factory<Key, Value>.[toFlowable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy))(
    pageSize: Int,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchScheduler: Scheduler? = null,
    notifyScheduler: Scheduler? = null,
    backpressureStrategy: BackpressureStrategy = BackpressureStrategy.LATEST
): Flowable<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(pageSize),
>             initialLoadKey,
>             this.asPagingSourceFactory(fetchScheduler?.asCoroutineDispatcher() ?: Dispatchers.IO)
>         ).flowable
> ```

Constructs a `Flowable<PagedList>`, from this `https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder`.

The returned `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html` will already be subscribed on the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)`, and will perform all loading on that scheduler. It will already be observed on `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)`, and will dispatch new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s, as well as their updates to that scheduler.

| Parameters |
|---|---|
| `pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Page size. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI / main thread. |
| `backpressureStrategy: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html = BackpressureStrategy.LATEST` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html` for the `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html` to use. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` |   |
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)` |   |

### () -\> PagingSource.toFlowable

android Artifact: [androidx.paging:paging-rxjava2](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/RxPagedList.kt+function:toFlowable)

```
fun <Key : Any, Value : Any> () -> PagingSource<Key, Value>.[toFlowable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toFlowable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy))(
    pageSize: Int,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchScheduler: Scheduler? = null,
    notifyScheduler: Scheduler? = null,
    backpressureStrategy: BackpressureStrategy = BackpressureStrategy.LATEST
): Flowable<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(pageSize),
>             initialLoadKey,
>             this
>         ).flowable
> ```

Constructs a `Flowable<PagedList>`, from this `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` factory, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder`.

The returned `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html` will already be subscribed on the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toFlowable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)`, and will perform all loading on that scheduler. It will already be observed on `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toFlowable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)`, and will dispatch new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s, as well as their updates to that scheduler.

| Parameters |
|---|---|
| `pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Page size. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI / main thread. |
| `backpressureStrategy: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html = BackpressureStrategy.LATEST` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/BackpressureStrategy.html` for the `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html` to use. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` |   |
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)` |   |

### DataSource.Factory.toLiveData

android Artifact: [androidx.paging:paging-runtime](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/LivePagedList.kt+function:toLiveData) Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/paging#2.1.0)

```
fun <Key : Any, Value : Any> DataSource.Factory<Key, Value>.[toLiveData](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toLiveData(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor))(
    config: PagedList.Config,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchExecutor: Executor = ArchTaskExecutor.getIOThreadExecutor()
): LiveData<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(
>                 config.pageSize,
>                 config.prefetchDistance,
>                 config.enablePlaceholders,
>                 config.initialLoadSizeHint,
>                 config.maxSize
>             ),
>             initialLoadKey,
>             this.asPagingSourceFactory(fetchExecutor.asCoroutineDispatcher())
>         ).liveData
> ```

Constructs a `LiveData<PagedList>`, from this `https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder`.

No work (such as loading) is done immediately, the creation of the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is deferred until the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` is observed.

| Parameters |
|---|---|
| `config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | Paging configuration. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `fetchExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html = ArchTaskExecutor.getIOThreadExecutor()` | `https://developer.android.com/reference/java/util/concurrent/Executor.html` for fetching data from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`s. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder` |   |

### DataSource.Factory.toLiveData

android Artifact: [androidx.paging:paging-runtime](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/LivePagedList.kt+function:toLiveData) Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/paging#2.1.0)

```
fun <Key : Any, Value : Any> DataSource.Factory<Key, Value>.[toLiveData](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toLiveData(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor))(
    pageSize: Int,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchExecutor: Executor = ArchTaskExecutor.getIOThreadExecutor()
): LiveData<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(pageSize),
>             initialLoadKey,
>             this.asPagingSourceFactory(fetchExecutor.asCoroutineDispatcher())
>         ).liveData
> ```

Constructs a `LiveData<PagedList>`, from this `DataSource.Factory`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder`.

No work (such as loading) is done immediately, the creation of the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is deferred until the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` is observed.

| Parameters |
|---|---|
| `pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Page size. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `fetchExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html = ArchTaskExecutor.getIOThreadExecutor()` | Executor for fetching data from DataSources. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder` |   |

### () -\> PagingSource.toLiveData

android Artifact: [androidx.paging:paging-runtime](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/LivePagedList.kt+function:toLiveData)

```
fun <Key : Any, Value : Any> () -> PagingSource<Key, Value>.[toLiveData](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toLiveData(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher))(
    config: PagedList.Config,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    coroutineScope: CoroutineScope = GlobalScope,
    fetchDispatcher: CoroutineDispatcher = ArchTaskExecutor.getIOThreadExecutor().asCoroutineDispatcher()
): LiveData<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(
>                 config.pageSize,
>                 config.prefetchDistance,
>                 config.enablePlaceholders,
>                 config.initialLoadSizeHint,
>                 config.maxSize
>             ),
>             initialLoadKey,
>             this
>         ).liveData
> ```

Constructs a `LiveData<PagedList>`, from this PagingSource factory, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder`.

No work (such as loading) is done immediately, the creation of the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is deferred until the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` is observed.

| Parameters |
|---|---|
| `config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | Paging configuration. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `coroutineScope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html = GlobalScope` | Set the `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` that page loads should be launched within. The set `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toLiveData(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher)` allows a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` to cancel running load operations when the results are no longer needed - for example, when the containing activity is destroyed. Defaults to `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-global-scope/index.html`. |
| `fetchDispatcher: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html = ArchTaskExecutor.getIOThreadExecutor().asCoroutineDispatcher()` | `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html` for fetching data from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`s. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder` |   |

### () -\> PagingSource.toLiveData

android Artifact: [androidx.paging:paging-runtime](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/LivePagedList.kt+function:toLiveData)

```
fun <Key : Any, Value : Any> () -> PagingSource<Key, Value>.[toLiveData](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toLiveData(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher))(
    pageSize: Int,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    coroutineScope: CoroutineScope = GlobalScope,
    fetchDispatcher: CoroutineDispatcher = ArchTaskExecutor.getIOThreadExecutor().asCoroutineDispatcher()
): LiveData<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(pageSize),
>             initialLoadKey,
>             this
>         ).liveData
> ```

Constructs a `LiveData<PagedList>`, from this PagingSource factory, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder`.

No work (such as loading) is done immediately, the creation of the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` is deferred until the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` is observed.

| Parameters |
|---|---|
| `pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Page size. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `coroutineScope: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html = GlobalScope` | Set the `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html` that page loads should be launched within. The set `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toLiveData(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher)` allows a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` to cancel running load operations when the results are no longer needed - for example, when the containing activity is destroyed. Defaults to `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-global-scope/index.html`. |
| `fetchDispatcher: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html = ArchTaskExecutor.getIOThreadExecutor().asCoroutineDispatcher()` | `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html` for fetching data from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`s. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LivePagedListBuilder` |   |

### DataSource.Factory.toObservable

android Artifact: [androidx.paging:paging-rxjava2](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/RxPagedList.kt+function:toObservable) Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/paging#2.1.0)

```
fun <Key : Any, Value : Any> DataSource.Factory<Key, Value>.[toObservable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler))(
    config: PagedList.Config,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchScheduler: Scheduler? = null,
    notifyScheduler: Scheduler? = null
): Observable<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(
>                 config.pageSize,
>                 config.prefetchDistance,
>                 config.enablePlaceholders,
>                 config.initialLoadSizeHint,
>                 config.maxSize
>             ),
>             initialLoadKey,
>             this.asPagingSourceFactory(fetchScheduler?.asCoroutineDispatcher() ?: Dispatchers.IO)
>         ).observable
> ```

Constructs a `Observable<PagedList>` from this `https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder`.

The returned `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html` will already be subscribed on the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)`, and will perform all loading on that scheduler. It will already be observed on `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)`, and will dispatch new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s, as well as their updates to that scheduler.

| Parameters |
|---|---|
| `config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | Paging configuration. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to PagedList load state. |
| `fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI / main thread. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` |   |
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)` |   |

### () -\> PagingSource.toObservable

android Artifact: [androidx.paging:paging-rxjava2](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/RxPagedList.kt+function:toObservable)

```
fun <Key : Any, Value : Any> () -> PagingSource<Key, Value>.[toObservable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler))(
    config: PagedList.Config,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchScheduler: Scheduler? = null,
    notifyScheduler: Scheduler? = null
): Observable<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(
>                 config.pageSize,
>                 config.prefetchDistance,
>                 config.enablePlaceholders,
>                 config.initialLoadSizeHint,
>                 config.maxSize
>             ),
>             initialLoadKey,
>             this.asPagingSourceFactory(fetchScheduler?.asCoroutineDispatcher() ?: Dispatchers.IO)
>         ).observable
> ```

Constructs a `Observable<PagedList>` from this `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` factory, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder`.

The returned `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html` will already be subscribed on the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)`, and will perform all loading on that scheduler. It will already be observed on `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toObservable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)`, and will dispatch new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s, as well as their updates to that scheduler.

| Parameters |
|---|---|
| `config: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Config` | Paging configuration. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to PagedList load state. |
| `fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI / main thread. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` |   |
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)` |   |

### DataSource.Factory.toObservable

android Artifact: [androidx.paging:paging-rxjava2](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/RxPagedList.kt+function:toObservable) Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/paging#2.1.0)

```
fun <Key : Any, Value : Any> DataSource.Factory<Key, Value>.[toObservable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler))(
    pageSize: Int,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchScheduler: Scheduler? = null,
    notifyScheduler: Scheduler? = null
): Observable<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(pageSize),
>             initialLoadKey,
>             this.asPagingSourceFactory(fetchScheduler?.asCoroutineDispatcher() ?: Dispatchers.IO)
>         ).observable
> ```

Constructs a `Observable<PagedList>` from this `https://developer.android.com/reference/kotlin/androidx/paging/DataSource.Factory`, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder`.

The returned `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html` will already be subscribed on the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)`, and will perform all loading on that scheduler. It will already be observed on `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toObservable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)`, and will dispatch new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s, as well as their updates to that scheduler.

| Parameters |
|---|---|
| `pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Size of pages to load. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/DataSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI / main thread. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` |   |
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)` |   |

### () -\> PagingSource.toObservable

android Artifact: [androidx.paging:paging-rxjava2](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/RxPagedList.kt+function:toObservable)

```
fun <Key : Any, Value : Any> () -> PagingSource<Key, Value>.[toObservable](https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toObservable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler))(
    pageSize: Int,
    initialLoadKey: Key? = null,
    boundaryCallback: PagedList.BoundaryCallback<Value>? = null,
    fetchScheduler: Scheduler? = null,
    notifyScheduler: Scheduler? = null
): Observable<PagedList<Value>>
```

> [!CAUTION]
> **This function is deprecated.**   
> PagedList is deprecated and has been replaced by PagingData, use this instead:
>
> ```kotlin
> Pager(
>             PagingConfig(pageSize),
>             initialLoadKey,
>             this
>         ).observable
> ```

Constructs a `Observable<PagedList>` from this `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` factory, convenience for `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder`.

The returned `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Observable.html` will already be subscribed on the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toObservable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)`, and will perform all loading on that scheduler. It will already be observed on `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(kotlin.Function0).toObservable(kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler)`, and will dispatch new `https://developer.android.com/reference/kotlin/androidx/paging/PagedList`s, as well as their updates to that scheduler.

| Parameters |
|---|---|
| `pageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Size of pages to load. |
| `initialLoadKey: Key? = null` | Initial load key passed to the first `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` / `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`. |
| `boundaryCallback: https://developer.android.com/reference/kotlin/androidx/paging/PagedList.BoundaryCallback<Value>? = null` | The boundary callback for listening to `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` load state. |
| `fetchScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` used to fetch from `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource`s, generally a background thread pool for e.g. I/O or network loading. |
| `notifyScheduler: https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html? = null` | `https://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Scheduler.html` that receives `https://developer.android.com/reference/kotlin/androidx/paging/PagedList` updates, and where `https://developer.android.com/reference/kotlin/androidx/paging/PagedList.Callback` calls are dispatched. Generally, this is the UI / main thread. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/RxPagedListBuilder` |   |
| `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.paging.DataSource.Factory).toFlowable(androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,io.reactivex.Scheduler,io.reactivex.Scheduler,io.reactivex.BackpressureStrategy)` |   |

## Extension properties

### Pager.liveData

android Artifact: [androidx.paging:paging-runtime](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingLiveData.kt+symbol:liveData)

```
val Pager<Key, Value>.liveData: LiveData<PagingData<Value>>
```

A `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`, which mirrors the stream provided by `https://developer.android.com/reference/kotlin/androidx/paging/Pager#flow()`, but exposes it as a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData`.

NOTE: Instances of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` emitted by this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` are not re-usable and cannot be submitted multiple times. This is especially relevant because `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` will replays the latest value downstream. To ensure you get a new instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` for each downstream observer, you should use the `https://developer.android.com/reference/kotlin/androidx/paging/package-summary#(androidx.lifecycle.LiveData).cachedIn(androidx.lifecycle.Lifecycle)` operator which multicasts the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` in a way that returns a new instance of `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` with cached data pre-loaded.