简体   繁体   中英

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()

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM