| <html devsite="true"> |
| <head> |
| <title>PagedList.Companion</title> |
| {% setvar book_path %}/reference/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/_java_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 methods</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>final <a href="/reference/androidx/paging/PagedList.html">PagedList</a><T></code></td> |
| <td width="100%"> |
| <div><code><K extends <a href="/reference/java/lang/Object.html">Object</a>, T extends <a href="/reference/java/lang/Object.html">Object</a>> <a href="/reference/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> <a href="/reference/androidx/paging/PagingSource.html">PagingSource</a><K, T> pagingSource,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagingSource.LoadResult.Page.html">PagingSource.LoadResult.Page</a><K, T> initialPage,<br> <a href="/reference/kotlinx/coroutines/CoroutineScope.html">CoroutineScope</a> coroutineScope,<br> <a href="/reference/kotlinx/coroutines/CoroutineDispatcher.html">CoroutineDispatcher</a> notifyDispatcher,<br> <a href="/reference/kotlinx/coroutines/CoroutineDispatcher.html">CoroutineDispatcher</a> fetchDispatcher,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><T> boundaryCallback,<br> <a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> K key<br>)</code></div> |
| <p>Create a <code><a href="/reference/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 methods</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/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><br>public final <a href="/reference/androidx/paging/PagedList.html">PagedList</a><T> <K extends <a href="/reference/java/lang/Object.html">Object</a>, T extends <a href="/reference/java/lang/Object.html">Object</a>> <a href="/reference/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> <a href="/reference/androidx/paging/PagingSource.html">PagingSource</a><K, T> pagingSource,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagingSource.LoadResult.Page.html">PagingSource.LoadResult.Page</a><K, T> initialPage,<br> <a href="/reference/kotlinx/coroutines/CoroutineScope.html">CoroutineScope</a> coroutineScope,<br> <a href="/reference/kotlinx/coroutines/CoroutineDispatcher.html">CoroutineDispatcher</a> notifyDispatcher,<br> <a href="/reference/kotlinx/coroutines/CoroutineDispatcher.html">CoroutineDispatcher</a> fetchDispatcher,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/PagedList.BoundaryCallback.html">PagedList.BoundaryCallback</a><T> boundaryCallback,<br> <a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config,<br> @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> K key<br>)</pre> |
| <p>Create a <code><a href="/reference/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/androidx/paging/PagedList.html">PagedList</a><T></code></td> |
| <td width="100%"> |
| <p>The newly created <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code>, which will page in data from the <code><a href="/reference/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 extends <a href="/reference/java/lang/Object.html">Object</a>></code></td> |
| <td width="100%"> |
| <p>Key type that indicates to the <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> what data to load.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><T extends <a href="/reference/java/lang/Object.html">Object</a>></code></td> |
| <td width="100%"> |
| <p>Type of items to be held and loaded by the <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a><K, T> pagingSource</code></td> |
| <td width="100%"> |
| <p><code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> providing data to the <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code></p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlinx/coroutines/CoroutineDispatcher.html">CoroutineDispatcher</a> notifyDispatcher</code></td> |
| <td width="100%"> |
| <p><code><a href="/reference/kotlinx/coroutines/CoroutineDispatcher.html">CoroutineDispatcher</a></code> that will use and consume data from the <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code>. Generally, this is the UI/main thread.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlinx/coroutines/CoroutineDispatcher.html">CoroutineDispatcher</a> fetchDispatcher</code></td> |
| <td width="100%"> |
| <p>Data loading jobs will be dispatched to this <code><a href="/reference/kotlinx/coroutines/CoroutineDispatcher.html">CoroutineDispatcher</a></code> - should be a background thread.</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><T> boundaryCallback</code></td> |
| <td width="100%"> |
| <p>Optional boundary callback to attach to the list.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a> config</code></td> |
| <td width="100%"> |
| <p><code><a href="/reference/androidx/paging/PagedList.Config.html">PagedList.Config</a></code>, which defines how the <code><a href="/reference/androidx/paging/PagedList.html">PagedList</a></code> will load data.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </body> |
| </html> |