Page

data class Page<E : Any>(val dataIndex: Int, val data: List<E>, val itemsBefore: Int?, val itemsAfter: Int?) : IviPagingSource.LoadResult<E>

Substitutes PagingSource.LoadResult.Page.

The PagingSource.LoadResult.Page.prevKey and PagingSource.LoadResult.Page.nextKey are replaced by dataIndex.

Constructors

Link copied to clipboard
fun <E : Any> Page(dataIndex: Int, data: List<E>, itemsBefore: Int?, itemsAfter: Int?)

Properties

Link copied to clipboard
val data: List<E>

The loaded data.

Link copied to clipboard

The index of data within the IviPagingSource. Must match with the corresponding LoadParams.dataIndex value.

Link copied to clipboard

Must be non-null to support placeholders. See LoadParams.placeholdersEnabled.

Link copied to clipboard

Must be non-null to support placeholders. See LoadParams.placeholdersEnabled.

Functions

Link copied to clipboard
open override fun toString(): String