blob: 487975fc32ebc39ca3089e5ed27c8ea57528c9ca [file] [log] [blame]
<html devsite="true">
<head>
<title>LoadState</title>
{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<div id="metadata-info-block"></div>
<h1>LoadState</h1>
<p>
<pre>public class <a href="/reference/androidx/paging/LoadState.html">LoadState</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/LoadState.Error.html">LoadState.Error</a>, <a href="/reference/androidx/paging/LoadState.Loading.html">LoadState.Loading</a>, <a href="/reference/androidx/paging/LoadState.NotLoading.html">LoadState.NotLoading</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/LoadState.Error.html">LoadState.Error</a></code></td>
<td>
<p>Loading hit an error.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/androidx/paging/LoadState.Loading.html">LoadState.Loading</a></code></td>
<td>
<p>Loading is in progress.</p>
</td>
</tr>
<tr>
<td width="40%"><code><a href="/reference/androidx/paging/LoadState.NotLoading.html">LoadState.NotLoading</a></code></td>
<td>
<p>Indicates the <code><a href="/reference/androidx/paging/PagingData.html">PagingData</a></code> is not currently loading, and no error currently observed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</devsite-expandable> </div>
<hr>
<p>LoadState of a PagedList load - associated with a <code><a href="/reference/androidx/paging/LoadType.html">LoadType</a></code></p>
<p><code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of any <code><a href="/reference/androidx/paging/LoadType.html">LoadType</a></code> may be observed for UI purposes by registering a listener via <code><a href="/reference/androidx/paging/PagingDataAdapter.html#addLoadStateListener(kotlin.Function1)">androidx.paging.PagingDataAdapter.addLoadStateListener</a></code> or <code><a href="/reference/androidx/paging/AsyncPagingDataDiffer.html#addLoadStateListener(kotlin.Function1)">androidx.paging.AsyncPagingDataDiffer.addLoadStateListener</a></code></p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%">See also</th>
</tr>
</thead>
<tbody class="list">
<tr>
<td width="40%"><code><a href="/reference/androidx/paging/LoadType.html">LoadType</a></code></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<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/LoadState.Error.html">LoadState.Error</a> extends <a href="/reference/androidx/paging/LoadState.html">LoadState</a></code></div>
<p>Loading hit an error.</p>
</td>
</tr>
<tr>
<td>
<div><code>public static class <a href="/reference/androidx/paging/LoadState.Loading.html">LoadState.Loading</a> extends <a href="/reference/androidx/paging/LoadState.html">LoadState</a></code></div>
<p>Loading is in progress.</p>
</td>
</tr>
<tr>
<td>
<div><code>public final class <a href="/reference/androidx/paging/LoadState.NotLoading.html">LoadState.NotLoading</a> extends <a href="/reference/androidx/paging/LoadState.html">LoadState</a></code></div>
<p>Indicates the <code><a href="/reference/androidx/paging/PagingData.html">PagingData</a></code> is not currently loading, and no error currently observed.</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>final boolean</code></td>
<td>
<div><code><a href="/reference/androidx/paging/LoadState.html#endOfPaginationReached()">endOfPaginationReached</a></code></div>
<p><code>false</code> if there is more data to load in the <code><a href="/reference/androidx/paging/LoadType.html">LoadType</a></code> this <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> is associated with, <code>true</code> otherwise.</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><a href="/reference/androidx/paging/LoadState.html#LoadState(kotlin.Boolean)">LoadState</a>(boolean&nbsp;endOfPaginationReached)</code></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list">
<h2>Public fields</h2>
<div class="api-item"><a name="getEndOfPaginationReached()"></a><a name="setEndOfPaginationReached()"></a><a name="getEndOfPaginationReached--"></a><a name="setEndOfPaginationReached--"></a>
<h3 class="api-name" id="endOfPaginationReached()">endOfPaginationReached</h3>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;boolean&nbsp;<a href="/reference/androidx/paging/LoadState.html#endOfPaginationReached()">endOfPaginationReached</a></pre>
<p><code>false</code> if there is more data to load in the <code><a href="/reference/androidx/paging/LoadType.html">LoadType</a></code> this <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> is associated with, <code>true</code> otherwise. This parameter informs <code><a href="/reference/androidx/paging/Pager.html">Pager</a></code> if it should continue to make requests for additional data in this direction or if it should halt as the end of the dataset has been reached.</p>
<p>Note: The REFRESH<code><a href="/reference/androidx/paging/LoadType.html#REFRESH">LoadType.REFRESH</a></code> always has <code><a href="/reference/androidx/paging/LoadState.html#endOfPaginationReached()">LoadState.endOfPaginationReached</a></code> set to <code>false</code>.</p>
</div>
</div>
<div class="list">
<h2>Protected constructors</h2>
<div class="api-item"><a name="LoadState-kotlin.Boolean-"></a><a name="loadstate"></a>
<h3 class="api-name" id="LoadState(kotlin.Boolean)">LoadState</h3>
<pre class="api-signature no-pretty-print">protected&nbsp;<a href="/reference/androidx/paging/LoadState.html#LoadState(kotlin.Boolean)">LoadState</a>(boolean&nbsp;endOfPaginationReached)</pre>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%">Parameters</th>
</tr>
</thead>
<tbody class="list">
<tr>
<td width="40%"><code>boolean&nbsp;endOfPaginationReached</code></td>
<td>
<p><code>false</code> if there is more data to load in the <code><a href="/reference/androidx/paging/LoadType.html">LoadType</a></code> this <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> is associated with, <code>true</code> otherwise. This parameter informs <code><a href="/reference/androidx/paging/Pager.html">Pager</a></code> if it should continue to make requests for additional data in this direction or if it should halt as the end of the dataset has been reached.</p>
<p>Note: The REFRESH<code><a href="/reference/androidx/paging/LoadType.html#REFRESH">LoadType.REFRESH</a></code> always has <code><a href="/reference/androidx/paging/LoadState.html#endOfPaginationReached()">LoadState.endOfPaginationReached</a></code> set to <code>false</code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>