Home > Back-end >  How to stay on top child in Firebase Database Android Studio
How to stay on top child in Firebase Database Android Studio

Time:11-04

I have some Database in Firebase:

My Firebase Database

I want to child "bestresult" in "Test 1" stay on top and new childs add after him. How I can do it?

CodePudding user response:

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.

  • Related