Please help me i need to add pagination in android firestore i have used base adapter to get events from firebase. i have read doc didn't find solution.
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
// ...
what i want is that i want to fetch next data and add it in my same list also i want to add event listeners in them and add data at the bottom of the list. How to call the next query for the same listener so that i could change data at runtime. Thanks in advance.