# LoadState

Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/LoadState.kt+class:androidx.paging.LoadState) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

*** ** * ** ***


```
public sealed class LoadState
```

<br />

Known direct subclasses [LoadState.Error](https://developer.android.com/reference/androidx/paging/LoadState.Error), [LoadState.Loading](https://developer.android.com/reference/androidx/paging/LoadState.Loading), [LoadState.NotLoading](https://developer.android.com/reference/androidx/paging/LoadState.NotLoading)

|---|---|
| `https://developer.android.com/reference/androidx/paging/LoadState.Error` | Loading hit an error. |
| `https://developer.android.com/reference/androidx/paging/LoadState.Loading` | Loading is in progress. |
| `https://developer.android.com/reference/androidx/paging/LoadState.NotLoading` | Indicates the `https://developer.android.com/reference/androidx/paging/PagingData` is not currently loading, and no error currently observed. |

*** ** * ** ***

LoadState of a PagedList load - associated with a `https://developer.android.com/reference/androidx/paging/LoadType`

`https://developer.android.com/reference/androidx/paging/LoadState` of any `https://developer.android.com/reference/androidx/paging/LoadType` may be observed for UI purposes by registering a listener via androidx.paging.PagingDataAdapter.addLoadStateListener or androidx.paging.AsyncPagingDataDiffer.addLoadStateListener

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/paging/LoadType` |   |

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/paging/LoadState.Error extends https://developer.android.com/reference/androidx/paging/LoadState` Loading hit an error. |
| `public static class https://developer.android.com/reference/androidx/paging/LoadState.Loading extends https://developer.android.com/reference/androidx/paging/LoadState` Loading is in progress. |
| `public final class https://developer.android.com/reference/androidx/paging/LoadState.NotLoading extends https://developer.android.com/reference/androidx/paging/LoadState` Indicates the `https://developer.android.com/reference/androidx/paging/PagingData` is not currently loading, and no error currently observed. |

| ### Protected constructors |
|---|
| `https://developer.android.com/reference/androidx/paging/LoadState#LoadState(kotlin.Boolean)(boolean endOfPaginationReached)` |

| ### Public methods |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/paging/LoadState#getEndOfPaginationReached()()` `false` if there is more data to load in the `https://developer.android.com/reference/androidx/paging/LoadType` this `https://developer.android.com/reference/androidx/paging/LoadState` is associated with, `true` otherwise. |

## Protected constructors

### LoadState

```
protected LoadState(boolean endOfPaginationReached)
```

| Parameters |
|---|---|
| `boolean endOfPaginationReached` | `false` if there is more data to load in the `https://developer.android.com/reference/androidx/paging/LoadType` this `https://developer.android.com/reference/androidx/paging/LoadState` is associated with, `true` otherwise. This parameter informs `https://developer.android.com/reference/androidx/paging/Pager` 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. Note: The REFRESH`https://developer.android.com/reference/androidx/paging/LoadType#REFRESH` always has `https://developer.android.com/reference/androidx/paging/LoadState#endOfPaginationReached()` set to `false`. |

## Public methods

### getEndOfPaginationReached

Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

```
public final boolean getEndOfPaginationReached()
```

`false` if there is more data to load in the `https://developer.android.com/reference/androidx/paging/LoadType` this `https://developer.android.com/reference/androidx/paging/LoadState` is associated with, `true` otherwise. This parameter informs `https://developer.android.com/reference/androidx/paging/Pager` 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.

Note: The REFRESH`https://developer.android.com/reference/androidx/paging/LoadType#REFRESH` always has `https://developer.android.com/reference/androidx/paging/LoadState#endOfPaginationReached()` set to `false`.