# PagedList.Callback

Summary:[Ctors](https://developer.android.com/reference/android/arch/paging/PagedList.Callback#pubctors)\|[Methods](https://developer.android.com/reference/android/arch/paging/PagedList.Callback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/arch/paging/PagedList.Callback#inhmethods)  

# PagedList.Callback

| The`android.arch`Architecture Components packages are no longer maintained. They have been superseded by the corresponding[androidx.\*](https://developer.android.com/jetpack/androidx/migrate)packages. See[androidx.paging.PagedList.Callback](https://developer.android.com/reference/androidx/paging/PagedList.Callback)instead.

`
public
static

abstract
class
PagedList.Callback
`  
`

extends Object


``


`

|---|----------------------------------------|
| java.lang.Object                          ||
| ↳ | android.arch.paging.PagedList.Callback |

<br />

*** ** * ** ***

Callback signaling when content is loaded into the list.

Can be used to listen to items being paged in and out. These calls will be dispatched on the executor defined by[setNotifyExecutor(Executor)](https://developer.android.com/reference/android/arch/paging/PagedList.Builder#setNotifyExecutor(java.util.concurrent.Executor)), which is generally the main/UI thread.

## Summary

|                                                       ### Public constructors                                                        ||
|-----------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[PagedList.Callback](https://developer.android.com/reference/android/arch/paging/PagedList.Callback#PagedList.Callback())`() ` |

|                                                                                                                                                             ### Public methods                                                                                                                                                             ||
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onChanged](https://developer.android.com/reference/android/arch/paging/PagedList.Callback#onChanged(int, int))`(int position, int count) ` Called when null padding items have been loaded to signal newly available data, or when data that hasn't been used in a while has been dropped, and swapped back to null. |
| ` abstract void` | ` `[onInserted](https://developer.android.com/reference/android/arch/paging/PagedList.Callback#onInserted(int, int))`(int position, int count) ` Called when new items have been loaded at the end or beginning of the list.                                                                                             |
| ` abstract void` | ` `[onRemoved](https://developer.android.com/reference/android/arch/paging/PagedList.Callback#onRemoved(int, int))`(int position, int count) ` Called when items have been removed at the end or beginning of the list, and have not been replaced by padded nulls.                                                      |

| ### Inherited methods |
|-----------------------|---|
| From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public constructors

### PagedList.Callback

```
PagedList.Callback ()
```

<br />

<br />

## Public methods

### onChanged

```
void onChanged (int position, 
                int count)
```

Called when null padding items have been loaded to signal newly available data, or when data that hasn't been used in a while has been dropped, and swapped back to null.

<br />

|                                                       Parameters                                                       ||
|------------|------------------------------------------------------------------------------------------------------------|
| `position` | `int`: Position of first newly loaded items, out of total number of items (including padded nulls). <br /> |
| `count`    | `int`: Number of items loaded. <br />                                                                      |

### onInserted

```
void onInserted (int position, 
                int count)
```

Called when new items have been loaded at the end or beginning of the list.

<br />

|                                               Parameters                                               ||
|------------|--------------------------------------------------------------------------------------------|
| `position` | `int`: Position of the first newly loaded item (in practice, either`0`or`size - 1`. <br /> |
| `count`    | `int`: Number of items loaded. <br />                                                      |

### onRemoved

```
void onRemoved (int position, 
                int count)
```

Called when items have been removed at the end or beginning of the list, and have not been replaced by padded nulls.

<br />

|                                               Parameters                                               ||
|------------|--------------------------------------------------------------------------------------------|
| `position` | `int`: Position of the first newly loaded item (in practice, either`0`or`size - 1`. <br /> |
| `count`    | `int`: Number of items loaded. <br />                                                      |

-

  ## Interfaces

  - [DataSource.InvalidatedCallback](https://developer.android.com/reference/android/arch/paging/DataSource.InvalidatedCallback)
-

  ## Classes

  - [AsyncPagedListDiffer](https://developer.android.com/reference/android/arch/paging/AsyncPagedListDiffer)
  - [DataSource](https://developer.android.com/reference/android/arch/paging/DataSource)
  - [DataSource.Factory](https://developer.android.com/reference/android/arch/paging/DataSource.Factory)
  - [ItemKeyedDataSource](https://developer.android.com/reference/android/arch/paging/ItemKeyedDataSource)
  - [ItemKeyedDataSource.LoadCallback](https://developer.android.com/reference/android/arch/paging/ItemKeyedDataSource.LoadCallback)
  - [ItemKeyedDataSource.LoadInitialCallback](https://developer.android.com/reference/android/arch/paging/ItemKeyedDataSource.LoadInitialCallback)
  - [ItemKeyedDataSource.LoadInitialParams](https://developer.android.com/reference/android/arch/paging/ItemKeyedDataSource.LoadInitialParams)
  - [ItemKeyedDataSource.LoadParams](https://developer.android.com/reference/android/arch/paging/ItemKeyedDataSource.LoadParams)
  - [LivePagedListBuilder](https://developer.android.com/reference/android/arch/paging/LivePagedListBuilder)
  - [PagedList](https://developer.android.com/reference/android/arch/paging/PagedList)
  - [PagedList.BoundaryCallback](https://developer.android.com/reference/android/arch/paging/PagedList.BoundaryCallback)
  - [PagedList.Builder](https://developer.android.com/reference/android/arch/paging/PagedList.Builder)
  - [PagedList.Callback](https://developer.android.com/reference/android/arch/paging/PagedList.Callback)
  - [PagedList.Config](https://developer.android.com/reference/android/arch/paging/PagedList.Config)
  - [PagedList.Config.Builder](https://developer.android.com/reference/android/arch/paging/PagedList.Config.Builder)
  - [PagedListAdapter](https://developer.android.com/reference/android/arch/paging/PagedListAdapter)
  - [PageKeyedDataSource](https://developer.android.com/reference/android/arch/paging/PageKeyedDataSource)
  - [PageKeyedDataSource.LoadCallback](https://developer.android.com/reference/android/arch/paging/PageKeyedDataSource.LoadCallback)
  - [PageKeyedDataSource.LoadInitialCallback](https://developer.android.com/reference/android/arch/paging/PageKeyedDataSource.LoadInitialCallback)
  - [PageKeyedDataSource.LoadInitialParams](https://developer.android.com/reference/android/arch/paging/PageKeyedDataSource.LoadInitialParams)
  - [PageKeyedDataSource.LoadParams](https://developer.android.com/reference/android/arch/paging/PageKeyedDataSource.LoadParams)
  - [PositionalDataSource](https://developer.android.com/reference/android/arch/paging/PositionalDataSource)
  - [PositionalDataSource.LoadInitialCallback](https://developer.android.com/reference/android/arch/paging/PositionalDataSource.LoadInitialCallback)
  - [PositionalDataSource.LoadInitialParams](https://developer.android.com/reference/android/arch/paging/PositionalDataSource.LoadInitialParams)
  - [PositionalDataSource.LoadRangeCallback](https://developer.android.com/reference/android/arch/paging/PositionalDataSource.LoadRangeCallback)
  - [PositionalDataSource.LoadRangeParams](https://developer.android.com/reference/android/arch/paging/PositionalDataSource.LoadRangeParams)
  - [RxPagedListBuilder](https://developer.android.com/reference/android/arch/paging/RxPagedListBuilder)