LivePagedListKt
public final class LivePagedListKt
Summary
Public methods |
|
|---|---|
static final @NonNull LiveData<@NonNull PagedList<@NonNull Value>> |
<Key extends Object, Value extends Object> This method is deprecated. PagedList is deprecated and has been replaced by PagingData |
static final @NonNull LiveData<@NonNull PagedList<@NonNull Value>> |
<Key extends Object, Value extends Object> This method is deprecated. PagedList is deprecated and has been replaced by PagingData |
static final @NonNull LiveData<@NonNull PagedList<@NonNull Value>> |
<Key extends Object, Value extends Object> This method is deprecated. PagedList is deprecated and has been replaced by PagingData |
static final @NonNull LiveData<@NonNull PagedList<@NonNull Value>> |
<Key extends Object, Value extends Object> This method is deprecated. PagedList is deprecated and has been replaced by PagingData |
Public methods
toLiveData
public static final @NonNull LiveData<@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object>toLiveData(
@NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
@NonNull PagedList.Config config,
Key initialLoadKey,
PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
@NonNull Executor fetchExecutor
)
Constructs a LiveData<PagedList>, from this DataSource.Factory, convenience for LivePagedListBuilder.
No work (such as loading) is done immediately, the creation of the first PagedList is deferred until the LiveData is observed.
| Parameters | |
|---|---|
@NonNull PagedList.Config config |
Paging configuration. |
Key initialLoadKey |
Initial load key passed to the first |
PagedList.BoundaryCallback<@NonNull Value> boundaryCallback |
The boundary callback for listening to |
@NonNull Executor fetchExecutor |
|
| See also | |
|---|---|
LivePagedListBuilder |
toLiveData
public static final @NonNull LiveData<@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object>toLiveData(
@NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
int pageSize,
Key initialLoadKey,
PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
@NonNull Executor fetchExecutor
)
Constructs a LiveData<PagedList>, from this DataSource.Factory, convenience for LivePagedListBuilder.
No work (such as loading) is done immediately, the creation of the first PagedList is deferred until the LiveData is observed.
| Parameters | |
|---|---|
int pageSize |
Page size. |
Key initialLoadKey |
Initial load key passed to the first |
PagedList.BoundaryCallback<@NonNull Value> boundaryCallback |
The boundary callback for listening to |
@NonNull Executor fetchExecutor |
Executor for fetching data from DataSources. |
| See also | |
|---|---|
LivePagedListBuilder |
toLiveData
public static final @NonNull LiveData<@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object>toLiveData(
@NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
@NonNull PagedList.Config config,
Key initialLoadKey,
PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
@NonNull CoroutineScope coroutineScope,
@NonNull CoroutineDispatcher fetchDispatcher
)
Constructs a LiveData<PagedList>, from this PagingSource factory, convenience for LivePagedListBuilder.
No work (such as loading) is done immediately, the creation of the first PagedList is deferred until the LiveData is observed.
| Parameters | |
|---|---|
@NonNull PagedList.Config config |
Paging configuration. |
Key initialLoadKey |
Initial load key passed to the first |
PagedList.BoundaryCallback<@NonNull Value> boundaryCallback |
The boundary callback for listening to |
@NonNull CoroutineScope coroutineScope |
Set the Defaults to |
@NonNull CoroutineDispatcher fetchDispatcher |
|
| See also | |
|---|---|
LivePagedListBuilder |
toLiveData
public static final @NonNull LiveData<@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object>toLiveData(
@NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
int pageSize,
Key initialLoadKey,
PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
@NonNull CoroutineScope coroutineScope,
@NonNull CoroutineDispatcher fetchDispatcher
)
Constructs a LiveData<PagedList>, from this PagingSource factory, convenience for LivePagedListBuilder.
No work (such as loading) is done immediately, the creation of the first PagedList is deferred until the LiveData is observed.
| Parameters | |
|---|---|
int pageSize |
Page size. |
Key initialLoadKey |
Initial load key passed to the first |
PagedList.BoundaryCallback<@NonNull Value> boundaryCallback |
The boundary callback for listening to |
@NonNull CoroutineScope coroutineScope |
Set the Defaults to |
@NonNull CoroutineDispatcher fetchDispatcher |
|
| See also | |
|---|---|
LivePagedListBuilder |