| <html devsite="true"> |
| <head> |
| <title>PagingSource.LoadParams</title> |
| {% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <div id="metadata-info-block"></div> |
| <h1>PagingSource.LoadParams</h1> |
| <p> |
| <pre>public class <a href="/reference/androidx/paging/PagingSource.LoadParams.html">PagingSource.LoadParams</a><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>></pre> |
| </p> |
| <div class="devsite-table-wrapper"><devsite-expandable><span class="expand-control jd-sumtable-subclasses">Known direct subclasses |
| <div class="showalways" id="subclasses-direct"><a href="/reference/androidx/paging/PagingSource.LoadParams.Append.html">PagingSource.LoadParams.Append</a>, <a href="/reference/androidx/paging/PagingSource.LoadParams.Prepend.html">PagingSource.LoadParams.Prepend</a>, <a href="/reference/androidx/paging/PagingSource.LoadParams.Refresh.html">PagingSource.LoadParams.Refresh</a></div> |
| </span> |
| <div id="subclasses-direct-summary"> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <colgroup> |
| <col width="40%"> |
| <col> |
| </colgroup> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code><a href="/reference/androidx/paging/PagingSource.LoadParams.Append.html">PagingSource.LoadParams.Append</a></code></td> |
| <td> |
| <p>Params to load a page of data from a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> via <code><a href="/reference/androidx/paging/PagingSource.html#load(androidx.paging.PagingSource.LoadParams)">PagingSource.load</a></code> to be appended to the end of the list.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code><a href="/reference/androidx/paging/PagingSource.LoadParams.Prepend.html">PagingSource.LoadParams.Prepend</a></code></td> |
| <td> |
| <p>Params to load a page of data from a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> via <code><a href="/reference/androidx/paging/PagingSource.html#load(androidx.paging.PagingSource.LoadParams)">PagingSource.load</a></code> to be prepended to the start of the list.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code><a href="/reference/androidx/paging/PagingSource.LoadParams.Refresh.html">PagingSource.LoadParams.Refresh</a></code></td> |
| <td> |
| <p>Params for an initial load request on a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> from <code><a href="/reference/androidx/paging/PagingSource.html#load(androidx.paging.PagingSource.LoadParams)">PagingSource.load</a></code> or a refresh triggered by <code><a href="/reference/androidx/paging/PagingSource.html#invalidate()">invalidate</a></code>.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </devsite-expandable> </div> |
| <hr> |
| <p>Params for a load request on a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> from <code><a href="/reference/androidx/paging/PagingSource.html#load(androidx.paging.PagingSource.LoadParams)">PagingSource.load</a></code>.</p> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <colgroup> |
| <col width="40%"> |
| <col> |
| </colgroup> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Nested types</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td> |
| <div><code>public final class <a href="/reference/androidx/paging/PagingSource.LoadParams.Append.html">PagingSource.LoadParams.Append</a><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> extends <a href="/reference/androidx/paging/PagingSource.LoadParams.html">PagingSource.LoadParams</a></code></div> |
| <p>Params to load a page of data from a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> via <code><a href="/reference/androidx/paging/PagingSource.html#load(androidx.paging.PagingSource.LoadParams)">PagingSource.load</a></code> to be appended to the end of the list.</p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <div><code>public final class <a href="/reference/androidx/paging/PagingSource.LoadParams.Prepend.html">PagingSource.LoadParams.Prepend</a><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> extends <a href="/reference/androidx/paging/PagingSource.LoadParams.html">PagingSource.LoadParams</a></code></div> |
| <p>Params to load a page of data from a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> via <code><a href="/reference/androidx/paging/PagingSource.html#load(androidx.paging.PagingSource.LoadParams)">PagingSource.load</a></code> to be prepended to the start of the list.</p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <div><code>public final class <a href="/reference/androidx/paging/PagingSource.LoadParams.Refresh.html">PagingSource.LoadParams.Refresh</a><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> extends <a href="/reference/androidx/paging/PagingSource.LoadParams.html">PagingSource.LoadParams</a></code></div> |
| <p>Params for an initial load request on a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> from <code><a href="/reference/androidx/paging/PagingSource.html#load(androidx.paging.PagingSource.LoadParams)">PagingSource.load</a></code> or a refresh triggered by <code><a href="/reference/androidx/paging/PagingSource.html#invalidate()">invalidate</a></code>.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <colgroup> |
| <col width="40%"> |
| <col> |
| </colgroup> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Public fields</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code>abstract Key</code></td> |
| <td> |
| <div><code><a href="/reference/androidx/paging/PagingSource.LoadParams.html#key()">key</a></code></div> |
| <p>Key for the page to be loaded.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>final int</code></td> |
| <td> |
| <div><code><a href="/reference/androidx/paging/PagingSource.LoadParams.html#loadSize()">loadSize</a></code></div> |
| <p>Requested number of items to load.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>final boolean</code></td> |
| <td> |
| <div><code><a href="/reference/androidx/paging/PagingSource.LoadParams.html#placeholdersEnabled()">placeholdersEnabled</a></code></div> |
| <p>From <code><a href="/reference/androidx/paging/PagingConfig.html#enablePlaceholders()">PagingConfig.enablePlaceholders</a></code>, true if placeholders are enabled and the load request for this <code><a href="/reference/androidx/paging/PagingSource.LoadParams.html">LoadParams</a></code> should populate <code><a href="/reference/androidx/paging/PagingSource.LoadResult.Page.html#itemsBefore()">LoadResult.Page.itemsBefore</a></code> and <code><a href="/reference/androidx/paging/PagingSource.LoadResult.Page.html#itemsAfter()">LoadResult.Page.itemsAfter</a></code> if possible.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <colgroup> |
| <col width="40%"> |
| <col> |
| </colgroup> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Protected constructors</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td> |
| <div><code><Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/paging/PagingSource.LoadParams.html#LoadParams(kotlin.Int,kotlin.Boolean)">LoadParams</a>(int loadSize, boolean placeholdersEnabled)</code></div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="list"> |
| <h2>Public fields</h2> |
| <div class="api-item"><a name="getKey()"></a><a name="setKey()"></a><a name="getKey--"></a><a name="setKey--"></a> |
| <h3 class="api-name" id="key()">key</h3> |
| <pre class="api-signature no-pretty-print">public abstract Key <a href="/reference/androidx/paging/PagingSource.LoadParams.html#key()">key</a></pre> |
| <p>Key for the page to be loaded.</p> |
| <p><code><a href="/reference/androidx/paging/PagingSource.LoadParams.html#key()">key</a></code> can be <code>null</code> only if this <code><a href="/reference/androidx/paging/PagingSource.LoadParams.html">LoadParams</a></code> is <code><a href="/reference/androidx/paging/PagingSource.LoadParams.Refresh.html">Refresh</a></code>, and either no <code>initialKey</code> is provided to the <code><a href="/reference/androidx/paging/Pager.html">Pager</a></code> or <code><a href="/reference/androidx/paging/PagingSource.html#getRefreshKey(androidx.paging.PagingState)">PagingSource.getRefreshKey</a></code> from the previous <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code> returns <code>null</code>.</p> |
| <p>The value of <code><a href="/reference/androidx/paging/PagingSource.LoadParams.html#key()">key</a></code> is dependent on the type of <code><a href="/reference/androidx/paging/PagingSource.LoadParams.html">LoadParams</a></code>:</p> |
| <ul> |
| <li> |
| <p><code><a href="/reference/androidx/paging/PagingSource.LoadParams.Refresh.html">Refresh</a></code></p> |
| </li> |
| <ul> |
| <li> |
| <p>On initial load, the nullable <code>initialKey</code> passed to the <code><a href="/reference/androidx/paging/Pager.html">Pager</a></code>.</p> |
| </li> |
| <li> |
| <p>On subsequent loads due to invalidation or refresh, the result of <code><a href="/reference/androidx/paging/PagingSource.html#getRefreshKey(androidx.paging.PagingState)">PagingSource.getRefreshKey</a></code>.</p> |
| </li> |
| </ul> |
| <li> |
| <p><code><a href="/reference/androidx/paging/PagingSource.LoadParams.Prepend.html">Prepend</a></code> - <code><a href="/reference/androidx/paging/PagingSource.LoadResult.Page.html#prevKey()">LoadResult.Page.prevKey</a></code> of the loaded page at the front of the list.</p> |
| </li> |
| <li> |
| <p><code><a href="/reference/androidx/paging/PagingSource.LoadParams.Append.html">Append</a></code> - <code><a href="/reference/androidx/paging/PagingSource.LoadResult.Page.html#nextKey()">LoadResult.Page.nextKey</a></code> of the loaded page at the end of the list.</p> |
| </li> |
| </ul> |
| </div> |
| <div class="api-item"><a name="getLoadSize()"></a><a name="setLoadSize()"></a><a name="getLoadSize--"></a><a name="setLoadSize--"></a> |
| <h3 class="api-name" id="loadSize()">loadSize</h3> |
| <pre class="api-signature no-pretty-print">public final int <a href="/reference/androidx/paging/PagingSource.LoadParams.html#loadSize()">loadSize</a></pre> |
| <p>Requested number of items to load.</p> |
| <p>Note: It is valid for <code><a href="/reference/androidx/paging/PagingSource.html#load(androidx.paging.PagingSource.LoadParams)">PagingSource.load</a></code> to return a <code><a href="/reference/androidx/paging/PagingSource.LoadResult.html">LoadResult</a></code> that has a different number of items than the requested load size.</p> |
| </div> |
| <div class="api-item"><a name="getPlaceholdersEnabled()"></a><a name="setPlaceholdersEnabled()"></a><a name="getPlaceholdersEnabled--"></a><a name="setPlaceholdersEnabled--"></a> |
| <h3 class="api-name" id="placeholdersEnabled()">placeholdersEnabled</h3> |
| <pre class="api-signature no-pretty-print">public final boolean <a href="/reference/androidx/paging/PagingSource.LoadParams.html#placeholdersEnabled()">placeholdersEnabled</a></pre> |
| <p>From <code><a href="/reference/androidx/paging/PagingConfig.html#enablePlaceholders()">PagingConfig.enablePlaceholders</a></code>, true if placeholders are enabled and the load request for this <code><a href="/reference/androidx/paging/PagingSource.LoadParams.html">LoadParams</a></code> should populate <code><a href="/reference/androidx/paging/PagingSource.LoadResult.Page.html#itemsBefore()">LoadResult.Page.itemsBefore</a></code> and <code><a href="/reference/androidx/paging/PagingSource.LoadResult.Page.html#itemsAfter()">LoadResult.Page.itemsAfter</a></code> if possible.</p> |
| </div> |
| </div> |
| <div class="list"> |
| <h2>Protected constructors</h2> |
| <div class="api-item"><a name="LoadParams(kotlin.Int, kotlin.Boolean)"></a><a name="LoadParams-kotlin.Int-kotlin.Boolean-"></a><a name="loadparams"></a> |
| <h3 class="api-name" id="LoadParams(kotlin.Int,kotlin.Boolean)">LoadParams</h3> |
| <pre class="api-signature no-pretty-print">protected <Key extends <a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>> <a href="/reference/androidx/paging/PagingSource.LoadParams.html#LoadParams(kotlin.Int,kotlin.Boolean)">LoadParams</a>(int loadSize, boolean placeholdersEnabled)</pre> |
| </div> |
| </div> |
| </body> |
| </html> |