[英]How to stay on top child in Firebase Database Android Studio
I have some Database in Firebase:我在 Firebase 中有一些数据库:
I want to child "bestresult" in "Test 1" stay on top and new childs add after him.我想让“测试 1”中的“最佳结果”保持领先地位,并在他之后添加新孩子。 How I can do it?我该怎么做?
Child nodes in the Firebase console are shown in alphabetical order. Firebase 控制台中的子节点按字母顺序显示。 There is no way to change this.没有办法改变这一点。
To control the order of child nodes in your application code, you can use the orderBy...
methods shown in the documentation on sorting data .要控制应用程序代码orderBy...
节点的顺序,您可以使用排序数据文档中显示的orderBy...
方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.