Skip to content

Commit 56a45e3

Browse files
authored
Merge pull request #512 from SUPERCILEX/fix-docs
Fix db documentation
2 parents 1a6f7bb + 87b1c31 commit 56a45e3

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* </pre>
4949
*
5050
* @param <T> The class type to use as a model for the data
51-
* contained in the children of the given Firebase location
51+
* contained in the children of the given Firebase location
5252
*/
5353
public abstract class FirebaseListAdapter<T> extends BaseAdapter {
5454
private static final String TAG = FirebaseListAdapter.class.getSimpleName();
@@ -85,18 +85,6 @@ public void onDataChanged() {
8585
});
8686
}
8787

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

153+
/**
154+
* This method will be triggered each time updates from the database have been completely processed.
155+
* So the first time this method is called, the initial data has been loaded - including the case
156+
* when no data at all is available. Each next time the method is called, a complete update (potentially
157+
* consisting of updates to multiple child items) has been completed.
158+
* <p>
159+
* You would typically override this method to hide a loading indicator (after the initial load) or
160+
* to complete a batch update to a UI element.
161+
*/
162+
protected void onDataChanged() {
163+
}
164+
165165
/**
166166
* This method will be triggered in the event that this listener either failed at the server,
167167
* or is removed as a result of the security and Firebase Database rules.

database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,6 @@ public void onDataChanged() {
122122
});
123123
}
124124

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

204+
/**
205+
* This method will be triggered each time updates from the database have been completely processed.
206+
* So the first time this method is called, the initial data has been loaded - including the case
207+
* when no data at all is available. Each next time the method is called, a complete update (potentially
208+
* consisting of updates to multiple child items) has been completed.
209+
* <p>
210+
* You would typically override this method to hide a loading indicator (after the initial load) or
211+
* to complete a batch update to a UI element.
212+
*/
213+
protected void onDataChanged() {
214+
}
215+
215216
/**
216217
* This method will be triggered in the event that this listener either failed at the server,
217218
* or is removed as a result of the security and Firebase Database rules.

0 commit comments

Comments
 (0)