How to update a FirebaseRecyclerAdapter's query

左心房为你撑大大i 提交于 2019-12-04 03:05:53

Firebase Database queries are immutable: you cannot change the properties of an existing query.

Since the adapters in FirebaseUI are mostly a reflection of the underlying data structure, we have not added the option to change the query for an existing adapter either.

When I create a new query, I also create a new adapter and tie that to the (list or recycler) view.

What advantage do you see of replacing the query under the existing adapter over creating a new adapter for the new query?

You can create a custom Adapter class to accomplish this but its not fully optimal. See: https://stackoverflow.com/a/53235783/683658

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!