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

CombinedLoadStates

class CombinedLoadStates
kotlin.Any
   ↳ androidx.paging.CombinedLoadStates

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

Summary

Public constructors
<init>(refresh: LoadState, prepend: LoadState, append: LoadState, source: LoadStates, mediator: LoadStates? = null)

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

Public methods
Boolean
equals(other: Any?)

Int

String

Properties
LoadState

Convenience for combined behavior of APPEND LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

LoadStates?

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

LoadState

Convenience for combined behavior of PREPEND LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

LoadState

Convenience for combined behavior of REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

LoadStates

LoadStates corresponding to loads from a PagingSource.

Public constructors

<init>

CombinedLoadStates(
    refresh: LoadState,
    prepend: LoadState,
    append: LoadState,
    source: LoadStates,
    mediator: LoadStates? = null)

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

Public methods

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String

Properties

append

val append: LoadState

Convenience for combined behavior of APPEND LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

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 combined behavior of PREPEND LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

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 combined behavior of REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

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.