【发布时间】:2019-08-24 11:05:45
【问题描述】:
【问题讨论】:
-
您想要获取的确切数据是什么?
-
@AlexMamo 工具的所有值也需要更新这些值。
-
问题解决了吗?
标签: android firebase hashmap google-cloud-firestore
【问题讨论】:
标签: android firebase hashmap google-cloud-firestore
好吧,您可以创建一个额外的元数据字段,在其中记下用户输入的所有键,例如,在一个数组中。它看起来像:
tool {
metadata: {
0: "brand_name"
1: "photo_model"
....
}
brand_name: "Sony"
photo_model: "DSLR"
...
}
或者您可以以任何其他方式存储它,但重点是,当您获取文档的 dataSnapshot 时,您首先检查这些元数据键,将它们收集到一个数组中,然后您才能构建您的自定义 Bundle 或其他任何东西你的对象看起来像一个循环
【讨论】: