请帮助我,我需要在Android FireStore中添加分页,我已经使用基本适配器从FireBase获取事件。我读过医生没有找到解决办法。
DocumentSnapshot lastVisible = documentSnapshots.getDocuments()
.get(documentSnapshots.size() -1);
// Construct a new query starting at this document,
// get the next 25 cities.
Query next = db.collection("cities")
.orderBy("population")
.startAfter(lastVisible)
.limit(25);
// Use the query for pagination
// ...
我想要的是获取下一个数据并将其添加到我的同一个列表中,我还想要在其中添加事件侦听器并在列表底部添加数据。
如何为同一个侦听器调用下一个查询,以便在运行时更改数据。
事先谢谢。