diff --git a/database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java b/database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java index 02775e8b0..747f5be58 100644 --- a/database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java +++ b/database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java @@ -48,7 +48,7 @@ * * * @param The class type to use as a model for the data - * contained in the children of the given Firebase location + * contained in the children of the given Firebase location */ public abstract class FirebaseListAdapter extends BaseAdapter { private static final String TAG = FirebaseListAdapter.class.getSimpleName(); @@ -85,18 +85,6 @@ public void onDataChanged() { }); } - - /* This method will be triggered each time updates from the database have been completely processed. - * So the first time this method is called, the initial data has been loaded - including the case - * when no data at all is available. Each next time the method is called, a complete update (potentially - * consisting of updates to multiple child items) has been completed. - *

- * You would typically override this method to hide a loading indicator (after the initial load) or - * to complete a batch update to a UI element. - */ - protected void onDataChanged() { - } - /** * @param activity The activity containing the ListView * @param modelClass Firebase will marshall the data at a location into @@ -162,6 +150,18 @@ public View getView(int position, View view, ViewGroup viewGroup) { return view; } + /** + * This method will be triggered each time updates from the database have been completely processed. + * So the first time this method is called, the initial data has been loaded - including the case + * when no data at all is available. Each next time the method is called, a complete update (potentially + * consisting of updates to multiple child items) has been completed. + *

+ * You would typically override this method to hide a loading indicator (after the initial load) or + * to complete a batch update to a UI element. + */ + protected void onDataChanged() { + } + /** * This method will be triggered in the event that this listener either failed at the server, * or is removed as a result of the security and Firebase Database rules. diff --git a/database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java b/database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java index 03b2dc7bf..e9fcade29 100644 --- a/database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java +++ b/database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java @@ -122,17 +122,6 @@ public void onDataChanged() { }); } - /* This method will be triggered each time updates from the database have been completely processed. - * So the first time this method is called, the initial data has been loaded - including the case - * when no data at all is available. Each next time the method is called, a complete update (potentially - * consisting of updates to multiple child items) has been completed. - *

- * You would typically override this method to hide a loading indicator (after the initial load) or - * to complete a batch update to a UI element. - */ - protected void onDataChanged() { - } - /** * @param modelClass Firebase will marshall the data at a location into * an instance of a class that you provide @@ -212,6 +201,18 @@ public int getItemViewType(int position) { return mModelLayout; } + /** + * This method will be triggered each time updates from the database have been completely processed. + * So the first time this method is called, the initial data has been loaded - including the case + * when no data at all is available. Each next time the method is called, a complete update (potentially + * consisting of updates to multiple child items) has been completed. + *

+ * You would typically override this method to hide a loading indicator (after the initial load) or + * to complete a batch update to a UI element. + */ + protected void onDataChanged() { + } + /** * This method will be triggered in the event that this listener either failed at the server, * or is removed as a result of the security and Firebase Database rules.