| <html devsite="true"> |
| <head> |
| <title>LivePagedListKt</title> |
| {% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>LivePagedListKt</h1> |
| {% setvar page_path %}androidx/paging/LivePagedListKt.html{% endsetvar %} |
| {% setvar can_switch %}1{% endsetvar %} |
| {% include "reference/_java_switcher2.md" %} |
| <p> |
| <pre>public final class LivePagedListKt</pre> |
| </p> |
| <hr> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public methods</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>static final <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/androidx/paging/PagedList.html">PagedList</a><Value>></code></td> |
| <td width="100%"> |
| <div><code><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>, Value extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <span><del><a href="/reference/androidx/paging/LivePagedListKt.html#toLiveData(androidx.paging.DataSource.Factory,androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor)">toLiveData</a></del></span>(<br> <a href="/reference/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, Value> receiver,<br> <a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback,<br> <a href="https://developer.android.com/reference/java/util/concurrent/Executor.html">Executor</a> fetchExecutor<br>)</code></div> |
| <p><strong>This method is deprecated.</strong> PagedList is deprecated and has been replaced by PagingData</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>static final <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/androidx/paging/PagedList.html">PagedList</a><Value>></code></td> |
| <td width="100%"> |
| <div><code><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>, Value extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <span><del><a href="/reference/androidx/paging/LivePagedListKt.html#toLiveData(androidx.paging.DataSource.Factory,kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor)">toLiveData</a></del></span>(<br> <a href="/reference/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, Value> receiver,<br> int pageSize,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback,<br> <a href="https://developer.android.com/reference/java/util/concurrent/Executor.html">Executor</a> fetchExecutor<br>)</code></div> |
| <p><strong>This method is deprecated.</strong> PagedList is deprecated and has been replaced by PagingData</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>static final <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/androidx/paging/PagedList.html">PagedList</a><Value>></code></td> |
| <td width="100%"> |
| <div><code><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>, Value extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <span><del><a href="/reference/androidx/paging/LivePagedListKt.html#toLiveData(kotlin.Function0,androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher)">toLiveData</a></del></span>(<br> Function0<<a href="/reference/androidx/paging/PagingSource.html">PagingSource</a><Key, Value>> receiver,<br> <a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback,<br> <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a> coroutineScope,<br> <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a> fetchDispatcher<br>)</code></div> |
| <p><strong>This method is deprecated.</strong> PagedList is deprecated and has been replaced by PagingData</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>static final <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/androidx/paging/PagedList.html">PagedList</a><Value>></code></td> |
| <td width="100%"> |
| <div><code><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>, Value extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <span><del><a href="/reference/androidx/paging/LivePagedListKt.html#toLiveData(kotlin.Function0,kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher)">toLiveData</a></del></span>(<br> Function0<<a href="/reference/androidx/paging/PagingSource.html">PagingSource</a><Key, Value>> receiver,<br> int pageSize,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback,<br> <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a> coroutineScope,<br> <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a> fetchDispatcher<br>)</code></div> |
| <p><strong>This method is deprecated.</strong> PagedList is deprecated and has been replaced by PagingData</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public methods</h2> |
| <div><a name="toLiveData(androidx.paging.DataSource.Factory, androidx.paging.PagedList.Config, kotlin.Any, androidx.paging.PagedList.BoundaryCallback, java.util.concurrent.Executor)"></a><a name="toLiveData-androidx.paging.DataSource.Factory-androidx.paging.PagedList.Config-kotlin.Any-androidx.paging.PagedList.BoundaryCallback-java.util.concurrent.Executor-"></a> |
| <h3 class="api-name" id="toLiveData(androidx.paging.DataSource.Factory,androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor)">toLiveData</h3> |
| <pre class="api-signature no-pretty-print">public static final <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/androidx/paging/PagedList.html">PagedList</a><Value>> <Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>, Value extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <span><del><a href="/reference/androidx/paging/LivePagedListKt.html#toLiveData(androidx.paging.DataSource.Factory,androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor)">toLiveData</a></del></span>(<br> <a href="/reference/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, Value> receiver,<br> <a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback,<br> <a href="https://developer.android.com/reference/java/util/concurrent/Executor.html">Executor</a> fetchExecutor<br>)</pre> |
| <aside class="caution"><strong>This method is deprecated.</strong><br>PagedList is deprecated and has been replaced by PagingData</aside> |
| <p>Constructs a <code>LiveData<PagedList></code>, from this <code><a href="/reference/androidx/paging/DataSource.Factory.html">DataSource.Factory</a></code>, convenience for <code><a href="/reference/androidx/paging/LivePagedListBuilder.html">LivePagedListBuilder</a></code>.</p> |
| <p>No work (such as loading) is done immediately, the creation of the first <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> is deferred until the <a href="[LiveData]">LiveData</a> is observed.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config</code></td> |
| <td width="100%"> |
| <p>Paging configuration.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey</code></td> |
| <td width="100%"> |
| <p>Initial load key passed to the first <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> / <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback</code></td> |
| <td width="100%"> |
| <p>The boundary callback for listening to <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> load state.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="https://developer.android.com/reference/java/util/concurrent/Executor.html">Executor</a> fetchExecutor</code></td> |
| <td width="100%"> |
| <p><code><a href="https://developer.android.com/reference/java/util/concurrent/Executor.html">Executor</a></code> for fetching data from <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>s.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">See also</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/androidx/paging/LivePagedListBuilder.html">LivePagedListBuilder</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="toLiveData(androidx.paging.DataSource.Factory, kotlin.Int, kotlin.Any, androidx.paging.PagedList.BoundaryCallback, java.util.concurrent.Executor)"></a><a name="toLiveData-androidx.paging.DataSource.Factory-kotlin.Int-kotlin.Any-androidx.paging.PagedList.BoundaryCallback-java.util.concurrent.Executor-"></a> |
| <h3 class="api-name" id="toLiveData(androidx.paging.DataSource.Factory,kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor)">toLiveData</h3> |
| <pre class="api-signature no-pretty-print">public static final <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/androidx/paging/PagedList.html">PagedList</a><Value>> <Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>, Value extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <span><del><a href="/reference/androidx/paging/LivePagedListKt.html#toLiveData(androidx.paging.DataSource.Factory,kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,java.util.concurrent.Executor)">toLiveData</a></del></span>(<br> <a href="/reference/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, Value> receiver,<br> int pageSize,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback,<br> <a href="https://developer.android.com/reference/java/util/concurrent/Executor.html">Executor</a> fetchExecutor<br>)</pre> |
| <aside class="caution"><strong>This method is deprecated.</strong><br>PagedList is deprecated and has been replaced by PagingData</aside> |
| <p>Constructs a <code>LiveData<PagedList></code>, from this <code>DataSource.Factory</code>, convenience for <code><a href="/reference/androidx/paging/LivePagedListBuilder.html">LivePagedListBuilder</a></code>.</p> |
| <p>No work (such as loading) is done immediately, the creation of the first <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> is deferred until the <a href="[LiveData]">LiveData</a> is observed.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>int pageSize</code></td> |
| <td width="100%"> |
| <p>Page size.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey</code></td> |
| <td width="100%"> |
| <p>Initial load key passed to the first <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> / <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback</code></td> |
| <td width="100%"> |
| <p>The boundary callback for listening to <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> load state.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="https://developer.android.com/reference/java/util/concurrent/Executor.html">Executor</a> fetchExecutor</code></td> |
| <td width="100%"> |
| <p>Executor for fetching data from DataSources.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">See also</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/androidx/paging/LivePagedListBuilder.html">LivePagedListBuilder</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="toLiveData(kotlin.Function0, androidx.paging.PagedList.Config, kotlin.Any, androidx.paging.PagedList.BoundaryCallback, kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.CoroutineDispatcher)"></a><a name="toLiveData-kotlin.Function0-androidx.paging.PagedList.Config-kotlin.Any-androidx.paging.PagedList.BoundaryCallback-kotlinx.coroutines.CoroutineScope-kotlinx.coroutines.CoroutineDispatcher-"></a> |
| <h3 class="api-name" id="toLiveData(kotlin.Function0,androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher)">toLiveData</h3> |
| <pre class="api-signature no-pretty-print">public static final <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/androidx/paging/PagedList.html">PagedList</a><Value>> <Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>, Value extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <span><del><a href="/reference/androidx/paging/LivePagedListKt.html#toLiveData(kotlin.Function0,androidx.paging.PagedList.Config,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher)">toLiveData</a></del></span>(<br> Function0<<a href="/reference/androidx/paging/PagingSource.html">PagingSource</a><Key, Value>> receiver,<br> <a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback,<br> <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a> coroutineScope,<br> <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a> fetchDispatcher<br>)</pre> |
| <aside class="caution"><strong>This method is deprecated.</strong><br>PagedList is deprecated and has been replaced by PagingData</aside> |
| <p>Constructs a <code>LiveData<PagedList></code>, from this PagingSource factory, convenience for <code><a href="/reference/androidx/paging/LivePagedListBuilder.html">LivePagedListBuilder</a></code>.</p> |
| <p>No work (such as loading) is done immediately, the creation of the first <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> is deferred until the <a href="[LiveData]">LiveData</a> is observed.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config</code></td> |
| <td width="100%"> |
| <p>Paging configuration.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey</code></td> |
| <td width="100%"> |
| <p>Initial load key passed to the first <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> / <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback</code></td> |
| <td width="100%"> |
| <p>The boundary callback for listening to <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> load state.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a> coroutineScope</code></td> |
| <td width="100%"> |
| <p>Set the <code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a></code> that page loads should be launched within. The set <code><a href="/reference/androidx/paging/package-summary.html#coroutineScope()">coroutineScope</a></code> allows a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> to cancel running load operations when the results are no longer needed - for example, when the containing activity is destroyed.</p> |
| <p>Defaults to <code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-global-scope/index.html">GlobalScope</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a> fetchDispatcher</code></td> |
| <td width="100%"> |
| <p><code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a></code> for fetching data from <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>s.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">See also</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/androidx/paging/LivePagedListBuilder.html">LivePagedListBuilder</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="toLiveData(kotlin.Function0, kotlin.Int, kotlin.Any, androidx.paging.PagedList.BoundaryCallback, kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.CoroutineDispatcher)"></a><a name="toLiveData-kotlin.Function0-kotlin.Int-kotlin.Any-androidx.paging.PagedList.BoundaryCallback-kotlinx.coroutines.CoroutineScope-kotlinx.coroutines.CoroutineDispatcher-"></a> |
| <h3 class="api-name" id="toLiveData(kotlin.Function0,kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher)">toLiveData</h3> |
| <pre class="api-signature no-pretty-print">public static final <a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/androidx/paging/PagedList.html">PagedList</a><Value>> <Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>, Value extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <span><del><a href="/reference/androidx/paging/LivePagedListKt.html#toLiveData(kotlin.Function0,kotlin.Int,kotlin.Any,androidx.paging.PagedList.BoundaryCallback,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher)">toLiveData</a></del></span>(<br> Function0<<a href="/reference/androidx/paging/PagingSource.html">PagingSource</a><Key, Value>> receiver,<br> int pageSize,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback,<br> <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a> coroutineScope,<br> <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a> fetchDispatcher<br>)</pre> |
| <aside class="caution"><strong>This method is deprecated.</strong><br>PagedList is deprecated and has been replaced by PagingData</aside> |
| <p>Constructs a <code>LiveData<PagedList></code>, from this PagingSource factory, convenience for <code><a href="/reference/androidx/paging/LivePagedListBuilder.html">LivePagedListBuilder</a></code>.</p> |
| <p>No work (such as loading) is done immediately, the creation of the first <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> is deferred until the <a href="[LiveData]">LiveData</a> is observed.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>int pageSize</code></td> |
| <td width="100%"> |
| <p>Page size.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> Key initialLoadKey</code></td> |
| <td width="100%"> |
| <p>Initial load key passed to the first <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> / <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><Value> boundaryCallback</code></td> |
| <td width="100%"> |
| <p>The boundary callback for listening to <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> load state.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a> coroutineScope</code></td> |
| <td width="100%"> |
| <p>Set the <code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a></code> that page loads should be launched within. The set <code><a href="/reference/androidx/paging/package-summary.html#coroutineScope()">coroutineScope</a></code> allows a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> to cancel running load operations when the results are no longer needed - for example, when the containing activity is destroyed.</p> |
| <p>Defaults to <code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-global-scope/index.html">GlobalScope</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a> fetchDispatcher</code></td> |
| <td width="100%"> |
| <p><code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a></code> for fetching data from <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>s.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">See also</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/androidx/paging/LivePagedListBuilder.html">LivePagedListBuilder</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </body> |
| </html> |