| <html devsite="true"> |
| <head> |
| <title>PagedList.Companion</title> |
| {% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>PagedList.Companion</h1> |
| {% setvar page_path %}androidx/paging/PagedList.Companion.html{% endsetvar %} |
| {% setvar can_switch %}1{% endsetvar %} |
| {% include "reference/_kotlin_switcher2.md" %} |
| <p> |
| <pre>object PagedList.Companion</pre> |
| </p> |
| <hr> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public functions</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>@<a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a> <a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a><T></code></td> |
| <td width="100%"> |
| <div><code><K : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>, T : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/PagedList.Companion.html#create(androidx.paging.PagingSource,androidx.paging.PagingSource.LoadResult.Page,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher,kotlinx.coroutines.CoroutineDispatcher,androidx.paging.PagedList.BoundaryCallback,androidx.paging.PagedList.Config,kotlin.Any)">create</a>(<br> pagingSource: <a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a><K, T>,<br> initialPage: <a href="/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page.html">PagingSource.LoadResult.Page</a><K, T>?,<br> coroutineScope: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a>,<br> notifyDispatcher: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a>,<br> fetchDispatcher: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a>,<br> boundaryCallback: <a href="/reference/kotlin/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><T>?,<br> config: <a href="/reference/kotlin/androidx/paging/PagedList.Config.html">PagedList.Config</a>,<br> key: K?<br>)</code></div> |
| <p>Create a <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code> which loads data from the provided data source on a background thread, posting updates to the main thread.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public functions</h2> |
| <div><a name="create(androidx.paging.PagingSource, androidx.paging.PagingSource.LoadResult.Page, kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.CoroutineDispatcher, kotlinx.coroutines.CoroutineDispatcher, androidx.paging.PagedList.BoundaryCallback, androidx.paging.PagedList.Config, kotlin.Any)"></a><a name="create-androidx.paging.PagingSource-androidx.paging.PagingSource.LoadResult.Page-kotlinx.coroutines.CoroutineScope-kotlinx.coroutines.CoroutineDispatcher-kotlinx.coroutines.CoroutineDispatcher-androidx.paging.PagedList.BoundaryCallback-androidx.paging.PagedList.Config-kotlin.Any-"></a> |
| <h3 class="api-name" id="create(androidx.paging.PagingSource,androidx.paging.PagingSource.LoadResult.Page,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher,kotlinx.coroutines.CoroutineDispatcher,androidx.paging.PagedList.BoundaryCallback,androidx.paging.PagedList.Config,kotlin.Any)">create</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><br>fun <K : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>, T : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/PagedList.Companion.html#create(androidx.paging.PagingSource,androidx.paging.PagingSource.LoadResult.Page,kotlinx.coroutines.CoroutineScope,kotlinx.coroutines.CoroutineDispatcher,kotlinx.coroutines.CoroutineDispatcher,androidx.paging.PagedList.BoundaryCallback,androidx.paging.PagedList.Config,kotlin.Any)">create</a>(<br> pagingSource: <a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a><K, T>,<br> initialPage: <a href="/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page.html">PagingSource.LoadResult.Page</a><K, T>?,<br> coroutineScope: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html">CoroutineScope</a>,<br> notifyDispatcher: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a>,<br> fetchDispatcher: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a>,<br> boundaryCallback: <a href="/reference/kotlin/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><T>?,<br> config: <a href="/reference/kotlin/androidx/paging/PagedList.Config.html">PagedList.Config</a>,<br> key: K?<br>): @<a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a> <a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a><T></pre> |
| <p>Create a <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code> which loads data from the provided data source on a background thread, posting updates to the main thread.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Returns</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>@<a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a> <a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a><T></code></td> |
| <td width="100%"> |
| <p>The newly created <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code>, which will page in data from the <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> as needed.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><K : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Key type that indicates to the <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> what data to load.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><T : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Type of items to be held and loaded by the <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>pagingSource: <a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a><K, T></code></td> |
| <td width="100%"> |
| <p><code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> providing data to the <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code></p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>notifyDispatcher: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a></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> that will use and consume data from the <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code>. Generally, this is the UI/main thread.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>fetchDispatcher: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a></code></td> |
| <td width="100%"> |
| <p>Data loading jobs will be dispatched to this <code><a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a></code> - should be a background thread.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>boundaryCallback: <a href="/reference/kotlin/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><T>?</code></td> |
| <td width="100%"> |
| <p>Optional boundary callback to attach to the list.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>config: <a href="/reference/kotlin/androidx/paging/PagedList.Config.html">PagedList.Config</a></code></td> |
| <td width="100%"> |
| <p><code><a href="/reference/kotlin/androidx/paging/PagedList.Config.html">PagedList.Config</a></code>, which defines how the <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code> will load data.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </body> |
| </html> |