简体   繁体   中英

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. How I can do it?

Child nodes in the Firebase console are shown in alphabetical order. 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 .

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM