{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

PagingData

class PagingData<T : Any>


Container for Paged data from a single generation of loads.

Each refresh of data (generally either pushed by local storage, or pulled from the network) will have a separate corresponding PagingData.

Summary

Public companion functions

PagingData<T>

Create a PagingData that immediately displays an empty list of items when submitted to androidx.paging.AsyncPagingDataAdapter.

PagingData<T>

Create a PagingData that immediately displays a static list of items when submitted to androidx.paging.AsyncPagingDataAdapter.

Public companion functions

empty

@<Error class: unknown class>
fun <T : Any> empty(): PagingData<T>

Create a PagingData that immediately displays an empty list of items when submitted to androidx.paging.AsyncPagingDataAdapter.

from

@<Error class: unknown class>
fun <T : Any> from(data: List<T>): PagingData<T>

Create a PagingData that immediately displays a static list of items when submitted to androidx.paging.AsyncPagingDataAdapter.

Parameters
data: List<T>

Static list of T to display.