I have a list of math topics as documents in firebaseFirestore. The objects of these topics (documents) have a field called, rootTopic that can be used to categorize them into groups.
I would like to query the collection of these topics (documents) and display them in groups using a recyclerView-in-recyclerView as seen below
THE CHALLENGE IS:
I am not quite sure how best to dynamically query and group these topics(documents). Please assist with hints or snippets on how to achieve this.
There are two ways to query the data you want:
db.collection("Mathematics").orderBy("topicName")
// Then partition the results and render them.
In any case I would suggest reading the documentation on queries and sorting cause it's pretty well explained there.
You should use multiple view types in a single recyclerView instead of multiple recyclerView. Here is one example article about it.
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.