LivePagedListBuilder

public final class LivePagedListBuilder<Key extends Object, Value extends Object>


Builder for LiveData<PagedList> for Java users, given a androidx.paging.DataSource.Factory and a androidx.paging.PagedList.Config.

The required parameters are in the constructor, so you can simply construct and build, or optionally enable extra features (such as initial load key, or BoundaryCallback).

Parameters
<Key extends Object>

Type of input valued used to load data from the DataSource. Must be Int if you're using PositionalDataSource.

<Value extends Object>

Item type being presented.

See also
toLiveData

Summary

Public constructors

<Key extends Object, Value extends Object> LivePagedListBuilder(
    DataSource.Factory<Key, Value> dataSourceFactory,
    PagedList.Config config
)

Creates a LivePagedListBuilder with required parameters.

<Key extends Object, Value extends Object> LivePagedListBuilder(
    DataSource.Factory<Key, Value> dataSourceFactory,
    int pageSize
)

Creates a LivePagedListBuilder with required parameters.

<Key extends Object, Value extends Object> LivePagedListBuilder(
    Function0<PagingSource<Key, Value>> pagingSourceFactory,
    PagedList.Config config
)

Creates a LivePagedListBuilder with required parameters.

<Key extends Object, Value extends Object> LivePagedListBuilder(
    Function0<PagingSource<Key, Value>> pagingSourceFactory,
    int pageSize
)

Creates a LivePagedListBuilder with required parameters.

Public methods

final @NonNull LiveData<@NonNull PagedList<@NonNull Value>>

Constructs the LiveData<PagedList>.

final @NonNull LivePagedListBuilder<@NonNull Key, @NonNull Value>