Returning a value in Firebase onDataChange
问题 I am trying to write a firebase app that contains a simple ArrayList that will serve as feed for a list view. In order to do so I have a singleton that takes care of FirebaseConnection and will fetch the data. This data is then feeded to the list. The problem is the data is first feeded to the list as null then the data is finished retrieving. Any solutions you might have for me? Here is my code: public ArrayList< Event > getAllEventsOnFirebase() { final ArrayList< Event > events = new