Arthur
Arthur

Reputation: 447

Jetpack Compose Paging3 invoke append to load next page

How do I invoke to load the next page to append my database when I reached the last item on

val lazyPagingItems = viewModel.getAllItems().collectAsLazyPagingItems()

Upvotes: 0

Views: 2450

Answers (2)

Alex Mamo
Alex Mamo

Reputation: 138804

As @Johann already mentioned in his answer, the mechanism to load more pages are present in the Paging library. If you consider at some point in time trying using Cloud Firestore, then for sure the following article will help:

And here is the corresponding repo.

Upvotes: 2

Johann
Johann

Reputation: 29867

Automatic loading of more items when you reach the end of the list is part of paging. Here's an article you can read that will show you the steps:

List view with Pagination using Jetpack Compose

Upvotes: 2

Related Questions