Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.

CombinedLoadStates

data class CombinedLoadStates
kotlin.Any
   ↳ androidx.paging.CombinedLoadStates

Collection of pagination LoadStates for both a PagingSource, and RemoteMediator.

Summary

Public constructors
<init>(source: LoadStates, mediator: LoadStates? = null)

Collection of pagination LoadStates for both a PagingSource, and RemoteMediator.

Public methods
Unit

Properties
LoadState

Convenience for accessing APPEND LoadState, which always defers to LoadState of mediator if it exists, otherwise equivalent to LoadState of source.

LoadStates?

LoadStates corresponding to loads from a RemoteMediator, or null if RemoteMediator not present.

LoadState

Convenience for accessing PREPEND LoadState, which always defers to LoadState of mediator if it exists, otherwise equivalent to LoadState of source.

LoadState

Convenience for accessing REFRESH LoadState, which always defers to LoadState of mediator if it exists, otherwise equivalent to LoadState of source.

LoadStates

LoadStates corresponding to loads from a PagingSource.

Public constructors

<init>

CombinedLoadStates(
    source: LoadStates,
    mediator: LoadStates? = null)

Collection of pagination LoadStates for both a PagingSource, and RemoteMediator.

Public methods

forEach

inline fun forEach(op: (LoadType, Boolean, LoadState) -> Unit): Unit

Properties

append

val append: LoadState

Convenience for accessing APPEND LoadState, which always defers to LoadState of mediator if it exists, otherwise equivalent to LoadState of source.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

mediator

val mediator: LoadStates?

LoadStates corresponding to loads from a RemoteMediator, or null if RemoteMediator not present.

prepend

val prepend: LoadState

Convenience for accessing PREPEND LoadState, which always defers to LoadState of mediator if it exists, otherwise equivalent to LoadState of source.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

refresh

val refresh: LoadState

Convenience for accessing REFRESH LoadState, which always defers to LoadState of mediator if it exists, otherwise equivalent to LoadState of source.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

source

val source: LoadStates

LoadStates corresponding to loads from a PagingSource.