[英]How can we achieve grouping of documents based on dates using FirestoreRecyclerAdapter in Android
How can we achieve grouping of documents based on dates using FirestoreRecyclerAdapter?
我们如何使用 FirestoreRecyclerAdapter 实现基于日期的文档分组?
Like below:如下所示:
20th Nov 2021 -item 21sth Nov 2021 -item -item -item 22nd Nov 2021 -item -item 2021 年 11 月 20 日-项目 2021 年 11 月 21 日-项目-项目-项目 2021 年 11 月 22 日-项目-项目
The Firestore adapters in the FirebaseUI library display a simple, flat list of documents based on the query that you pass in, rendering one view holder for each document. FirebaseUI 库中的 Firestore 适配器根据您传入的查询显示一个简单、平面的文档列表,为每个文档呈现一个视图持有者。
They have very limited support for varying the layout for each document, basically only allowing you to select a different view holder based on information in the document.他们对改变每个文档的布局的支持非常有限,基本上只允许您根据文档中的信息 select 不同的视图持有者。 There is no support for adding additional view holders for items that are not being returned from Firestore, like the date groupings in your use-case.
不支持为未从 Firestore 返回的项目添加额外的视图持有者,例如您的用例中的日期分组。
You will need to build your own adapter to allow this sort of layout.您将需要构建自己的适配器以允许这种布局。
How can I get files restored if I'm locked out of an email how can I get them brought back up how can I get back into the email如果我被锁定在 email 之外,如何恢复文件 我怎样才能恢复它们 我怎样才能回到 email
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.