| <html devsite="true"> |
| <head> |
| <title>RxPagingSource</title> |
| {% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>RxPagingSource</h1> |
| {% setvar page_path %}androidx/paging/rxjava3/RxPagingSource.html{% endsetvar %} |
| {% setvar can_switch %}1{% endsetvar %} |
| {% include "reference/_kotlin_switcher2.md" %} |
| <p> |
| <pre>abstract class RxPagingSource<Key : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>, Value : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> : <a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></pre> |
| </p> |
| <div class="devsite-table-wrapper"> |
| <table class="jd-inheritance-table"> |
| <tbody> |
| <tr> |
| <td colspan="3"><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a></td> |
| </tr> |
| <tr> |
| <td class="jd-inheritance-space"> ↳</td> |
| <td colspan="2"><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></td> |
| </tr> |
| <tr> |
| <td> </td> |
| <td class="jd-inheritance-space"> ↳</td> |
| <td colspan="1"><a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html">RxPagingSource</a></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <hr> |
| <p>Rx-based compatibility wrapper around <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code>'s suspending APIs.</p> |
| <h2>Summary</h2> |
| <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="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#invalid()">invalid</a></code></div> |
| <p>Whether this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> has been invalidated, which should happen when the data this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> represents changes since it was first instantiated.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#jumpingSupported()">jumpingSupported</a></code></div> |
| <p><code>true</code> if this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> supports jumping, <code>false</code> otherwise.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#keyReuseSupported()">keyReuseSupported</a></code></div> |
| <p><code>true</code> if this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> expects to re-use keys to load distinct pages without a call to <code><a href="/reference/kotlin/androidx/paging/PagingSource.html#invalidate()">invalidate</a></code>, <code>false</code> otherwise.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public constructors</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td> |
| <div><code><Key : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>, Value : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#RxPagingSource()">RxPagingSource</a>()</code></div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public functions</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>suspend final <a href="/reference/kotlin/androidx/paging/PagingSource.LoadResult.html">PagingSource.LoadResult</a><Key, Value></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#load(androidx.paging.PagingSource.LoadParams)">load</a>(params: <a href="/reference/kotlin/androidx/paging/PagingSource.LoadParams.html">PagingSource.LoadParams</a><Key>)</code></div> |
| <p>Loading API for <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>abstract <a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/kotlin/androidx/paging/PagingSource.LoadResult.html">PagingSource.LoadResult</a><Key, Value>></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#loadSingle(androidx.paging.PagingSource.LoadParams)">loadSingle</a>(params: <a href="/reference/kotlin/androidx/paging/PagingSource.LoadParams.html">PagingSource.LoadParams</a><Key>)</code></div> |
| <p>Loading API for <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive" id="inhmethods"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Inherited functions</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><devsite-expandable><span class="expand-control">From class <a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></span> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <tbody> |
| <tr> |
| <td><code>open @<a href="/reference/kotlin/androidx/paging/ExperimentalPagingApi.html">ExperimentalPagingApi</a> Key?</code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagingSource.html#getRefreshKey(androidx.paging.PagingState)">getRefreshKey</a>(state: <a href="/reference/kotlin/androidx/paging/PagingState.html">PagingState</a><Key, Value>)</code></div> |
| <p>Request a refresh key given the current <code><a href="/reference/kotlin/androidx/paging/PagingState.html">PagingState</a></code> of the associated <code><a href="/reference/kotlin/androidx/paging/PagingData.html">PagingData</a></code> used to present loaded data from this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagingSource.html#invalidate()">invalidate</a>()</code></div> |
| <p>Signal the <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> to stop loading.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagingSource.html#registerInvalidatedCallback(kotlin.Function0)">registerInvalidatedCallback</a>(onInvalidatedCallback: () -> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>)</code></div> |
| <p>Add a callback to invoke when the <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> is first invalidated.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/PagingSource.html#unregisterInvalidatedCallback(kotlin.Function0)">unregisterInvalidatedCallback</a>(onInvalidatedCallback: () -> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>)</code></div> |
| <p>Remove a previously added invalidate callback.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </devsite-expandable> </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public properties</h2> |
| <div><a name="getInvalid()"></a><a name="setInvalid()"></a><a name="getInvalid--"></a><a name="setInvalid--"></a> |
| <h3 class="api-name" id="invalid()">invalid</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#invalid()">invalid</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></pre> |
| <p>Whether this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> has been invalidated, which should happen when the data this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> represents changes since it was first instantiated.</p> |
| </div> |
| <div><a name="getJumpingSupported()"></a><a name="setJumpingSupported()"></a><a name="getJumpingSupported--"></a><a name="setJumpingSupported--"></a> |
| <h3 class="api-name" id="jumpingSupported()">jumpingSupported</h3> |
| <pre class="api-signature no-pretty-print">open val <a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#jumpingSupported()">jumpingSupported</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></pre> |
| <p><code>true</code> if this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> supports jumping, <code>false</code> otherwise.</p> |
| <p>Override this to <code>true</code> if pseudo-fast scrolling via jumps is supported.</p> |
| <p>A jump occurs when a <code>RecyclerView</code> scrolls through a number of placeholders defined by <code><a href="/reference/kotlin/androidx/paging/PagingConfig.html#jumpThreshold()">PagingConfig.jumpThreshold</a></code> and triggers a load with <code><a href="/reference/kotlin/androidx/paging/LoadType.REFRESH.html">LoadType</a></code>.</p> |
| <p><code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code>s that support jumps should override <code><a href="/reference/kotlin/androidx/paging/PagingSource.html#getRefreshKey(androidx.paging.PagingState)">getRefreshKey</a></code> to return a <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">Key</a></code> that would load data fulfilling the viewport given a user's current <code><a href="/reference/kotlin/androidx/paging/PagingState.html#anchorPosition()">PagingState.anchorPosition</a></code>.</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/PagingConfig.html#jumpThreshold()">jumpThreshold</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="getKeyReuseSupported()"></a><a name="setKeyReuseSupported()"></a><a name="getKeyReuseSupported--"></a><a name="setKeyReuseSupported--"></a> |
| <h3 class="api-name" id="keyReuseSupported()">keyReuseSupported</h3> |
| <pre class="api-signature no-pretty-print">open val <a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#keyReuseSupported()">keyReuseSupported</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></pre> |
| <p><code>true</code> if this <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code> expects to re-use keys to load distinct pages without a call to <code><a href="/reference/kotlin/androidx/paging/PagingSource.html#invalidate()">invalidate</a></code>, <code>false</code> otherwise.</p> |
| </div> |
| <h2>Public constructors</h2> |
| <div><a name="RxPagingSource--"></a> |
| <h3 class="api-name" id="RxPagingSource()">RxPagingSource</h3> |
| <pre class="api-signature no-pretty-print"><Key : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>, Value : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#RxPagingSource()">RxPagingSource</a>()</pre> |
| </div> |
| <h2>Public functions</h2> |
| <div><a name="load-androidx.paging.PagingSource.LoadParams-"></a> |
| <h3 class="api-name" id="load(androidx.paging.PagingSource.LoadParams)">load</h3> |
| <pre class="api-signature no-pretty-print">suspend final fun <a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#load(androidx.paging.PagingSource.LoadParams)">load</a>(params: <a href="/reference/kotlin/androidx/paging/PagingSource.LoadParams.html">PagingSource.LoadParams</a><Key>): <a href="/reference/kotlin/androidx/paging/PagingSource.LoadResult.html">PagingSource.LoadResult</a><Key, Value></pre> |
| <p>Loading API for <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| <p>Implement this method to trigger your async load (e.g. from database or network).</p> |
| </div> |
| <div><a name="loadSingle-androidx.paging.PagingSource.LoadParams-"></a> |
| <h3 class="api-name" id="loadSingle(androidx.paging.PagingSource.LoadParams)">loadSingle</h3> |
| <pre class="api-signature no-pretty-print">abstract fun <a href="/reference/kotlin/androidx/paging/rxjava3/RxPagingSource.html#loadSingle(androidx.paging.PagingSource.LoadParams)">loadSingle</a>(params: <a href="/reference/kotlin/androidx/paging/PagingSource.LoadParams.html">PagingSource.LoadParams</a><Key>): <a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="/reference/kotlin/androidx/paging/PagingSource.LoadResult.html">PagingSource.LoadResult</a><Key, Value>></pre> |
| <p>Loading API for <code><a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| <p>Implement this method to trigger your async load (e.g. from database or network).</p> |
| </div> |
| </body> |
| </html> |