简体   繁体   English

Jetpack Compose Paging3 调用 append 加载下一页

[英]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当我到达最后一项时,如何调用以将下一页加载到我的数据库的 append

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 使用 Jetpack Compose 的分页列表视图

As @Johann already mentioned in his answer, the mechanism to load more pages are present in the Paging library.正如@Johann 在他的回答中已经提到的那样,加载更多页面的机制存在于 Paging 库中。 If you consider at some point in time trying using Cloud Firestore , then for sure the following article will help:如果您考虑在某个时间点尝试使用Cloud Firestore ,那么以下文章肯定会有所帮助:

And here is the corresponding repo .这是相应的repo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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