| <html devsite="true"> |
| <head> |
| <title>DifferCallback</title> |
| {% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>DifferCallback</h1> |
| {% setvar page_path %}androidx/paging/DifferCallback.html{% endsetvar %} |
| {% setvar can_switch %}1{% endsetvar %} |
| {% include "reference/_kotlin_switcher2.md" %} |
| <p> |
| <pre>interface DifferCallback</pre> |
| </p> |
| <hr> |
| <p>Callback for the presenter/adapter to listen to the state of pagination data.</p> |
| <p>Note that these won't map directly to PageEvents, since PageEvents can cause several adapter events that should all be dispatched to the presentation layer at once - as part of the same frame.</p> |
| <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="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/DifferCallback.html#onChanged(kotlin.Int,kotlin.Int)">onChanged</a>(position: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, count: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div> |
| </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/DifferCallback.html#onInserted(kotlin.Int,kotlin.Int)">onInserted</a>(position: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, count: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div> |
| </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/DifferCallback.html#onRemoved(kotlin.Int,kotlin.Int)">onRemoved</a>(position: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, count: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public functions</h2> |
| <div><a name="onChanged(kotlin.Int, kotlin.Int)"></a><a name="onChanged-kotlin.Int-kotlin.Int-"></a> |
| <h3 class="api-name" id="onChanged(kotlin.Int,kotlin.Int)">onChanged</h3> |
| <pre class="api-signature no-pretty-print">fun <a href="/reference/kotlin/androidx/paging/DifferCallback.html#onChanged(kotlin.Int,kotlin.Int)">onChanged</a>(position: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, count: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre> |
| </div> |
| <div><a name="onInserted(kotlin.Int, kotlin.Int)"></a><a name="onInserted-kotlin.Int-kotlin.Int-"></a> |
| <h3 class="api-name" id="onInserted(kotlin.Int,kotlin.Int)">onInserted</h3> |
| <pre class="api-signature no-pretty-print">fun <a href="/reference/kotlin/androidx/paging/DifferCallback.html#onInserted(kotlin.Int,kotlin.Int)">onInserted</a>(position: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, count: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre> |
| </div> |
| <div><a name="onRemoved(kotlin.Int, kotlin.Int)"></a><a name="onRemoved-kotlin.Int-kotlin.Int-"></a> |
| <h3 class="api-name" id="onRemoved(kotlin.Int,kotlin.Int)">onRemoved</h3> |
| <pre class="api-signature no-pretty-print">fun <a href="/reference/kotlin/androidx/paging/DifferCallback.html#onRemoved(kotlin.Int,kotlin.Int)">onRemoved</a>(position: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, count: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre> |
| </div> |
| </body> |
| </html> |