Posts

Showing posts with the label sort numbers in Firebase

Sort Firebase data for Android project

Image
If your firebase data contains same keys at each position, as shown in image below, then you can follow the steps below for sorting the data before displaying it in an app created in Sketchware. 1. In your Sketchware project, add a ListView listview1 . 2. Create a CustomView custom.xml . In this View add TextViews for displaying data at each position in Firebase database. 3. In properties of listview1 select custom.xml as customView. 4. Add a new List Map  maplist . 5. Add a FirebaseDB component with any name, and with data location same as in your Firebase database. ( fdb: results ) 6. Add ListView onBindCustomView event. In this event use blocks for displaying the data from List Map  maplist  in ListView listview1 . 7. Save and run the project. 8. Delete the installed app. 9. Export source code of this project. Unzip it in a folder on sdcard. 10. Open the project in AIDE. 11. In app level build.gradle  file, in dependencies, chang...