| <html devsite="true"> |
| <head> |
| <title>PagedList.Config</title> |
| {% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>PagedList.Config</h1> |
| {% setvar page_path %}androidx/paging/PagedList.Config.html{% endsetvar %} |
| {% setvar can_switch %}1{% endsetvar %} |
| {% include "reference/_kotlin_switcher2.md" %} |
| <p> |
| <pre>class PagedList.Config</pre> |
| </p> |
| <hr> |
| <p>Configures how a <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code> loads content from its <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| <p>Use <code><a href="/reference/kotlin/androidx/paging/PagedList.Config.Builder.html">PagedList.Config.Builder</a></code> to construct and define custom loading behavior, such as <code><a href="/reference/kotlin/androidx/paging/PagedList.Config.Builder.html#setPageSize(kotlin.Int)">setPageSize</a></code>, which defines number of items loaded at a time.</p> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Nested types</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/PagedList.Config.Builder.html">PagedList.Config.Builder</a></code></td> |
| <td width="100%"> |
| <p>Builder class for <code><a href="/reference/kotlin/androidx/paging/PagedList.Config.html">PagedList.Config</a></code>.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public properties</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/kotlin/Boolean.html">Boolean</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagedList.Config.html#enablePlaceholders()">enablePlaceholders</a></code></div> |
| <p>Defines whether the <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code> may display null placeholders, if the <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> provides them.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/kotlin/Int.html">Int</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagedList.Config.html#initialLoadSizeHint()">initialLoadSizeHint</a></code></div> |
| <p>Size hint for initial load of PagedList, often larger than a regular page.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/kotlin/Int.html">Int</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagedList.Config.html#maxSize()">maxSize</a></code></div> |
| <p>Defines the maximum number of items that may be loaded into this pagedList before pages should be dropped.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/kotlin/Int.html">Int</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagedList.Config.html#pageSize()">pageSize</a></code></div> |
| <p>Size of each page loaded by the PagedList.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/kotlin/Int.html">Int</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagedList.Config.html#prefetchDistance()">prefetchDistance</a></code></div> |
| <p>Prefetch distance which defines how far ahead to load.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public properties</h2> |
| <div><a name="getEnablePlaceholders()"></a><a name="setEnablePlaceholders()"></a><a name="getEnablePlaceholders--"></a><a name="setEnablePlaceholders--"></a> |
| <h3 class="api-name" id="enablePlaceholders()">enablePlaceholders</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/paging/PagedList.Config.html#enablePlaceholders()">enablePlaceholders</a>: <a href="/reference/kotlin/kotlin/Boolean.html">Boolean</a></pre> |
| <p>Defines whether the <code><a href="/reference/kotlin/androidx/paging/PagedList.html">PagedList</a></code> may display null placeholders, if the <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> provides them.</p> |
| </div> |
| <div><a name="getInitialLoadSizeHint()"></a><a name="setInitialLoadSizeHint()"></a><a name="getInitialLoadSizeHint--"></a><a name="setInitialLoadSizeHint--"></a> |
| <h3 class="api-name" id="initialLoadSizeHint()">initialLoadSizeHint</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/paging/PagedList.Config.html#initialLoadSizeHint()">initialLoadSizeHint</a>: <a href="/reference/kotlin/kotlin/Int.html">Int</a></pre> |
| <p>Size hint for initial load of PagedList, often larger than a regular page.</p> |
| </div> |
| <div><a name="getMaxSize()"></a><a name="setMaxSize()"></a><a name="getMaxSize--"></a><a name="setMaxSize--"></a> |
| <h3 class="api-name" id="maxSize()">maxSize</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/paging/PagedList.Config.html#maxSize()">maxSize</a>: <a href="/reference/kotlin/kotlin/Int.html">Int</a></pre> |
| <p>Defines the maximum number of items that may be loaded into this pagedList before pages should be dropped.</p> |
| <p>If set to <code><a href="/reference/kotlin/androidx/paging/PagedList.Config.Companion.html#MAX_SIZE_UNBOUNDED()">PagedList.Config.Companion.MAX_SIZE_UNBOUNDED</a></code>, pages will never be dropped.</p> |
| <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/kotlin/androidx/paging/PagedList.Config.Companion.html#MAX_SIZE_UNBOUNDED()">MAX_SIZE_UNBOUNDED</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/PagedList.Config.Builder.html#setMaxSize(kotlin.Int)">setMaxSize</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="getPageSize()"></a><a name="setPageSize()"></a><a name="getPageSize--"></a><a name="setPageSize--"></a> |
| <h3 class="api-name" id="pageSize()">pageSize</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/paging/PagedList.Config.html#pageSize()">pageSize</a>: <a href="/reference/kotlin/kotlin/Int.html">Int</a></pre> |
| <p>Size of each page loaded by the PagedList.</p> |
| </div> |
| <div><a name="getPrefetchDistance()"></a><a name="setPrefetchDistance()"></a><a name="getPrefetchDistance--"></a><a name="setPrefetchDistance--"></a> |
| <h3 class="api-name" id="prefetchDistance()">prefetchDistance</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/paging/PagedList.Config.html#prefetchDistance()">prefetchDistance</a>: <a href="/reference/kotlin/kotlin/Int.html">Int</a></pre> |
| <p>Prefetch distance which defines how far ahead to load.</p> |
| <p>If this value is set to 50, the paged list will attempt to load 50 items in advance of data that's already been accessed.</p> |
| <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/kotlin/androidx/paging/PagedList.html#loadAround(kotlin.Int)">loadAround</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </body> |
| </html> |