|
48 | 48 | * </pre> |
49 | 49 | * |
50 | 50 | * @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 |
52 | 52 | */ |
53 | 53 | public abstract class FirebaseListAdapter<T> extends BaseAdapter { |
54 | 54 | private static final String TAG = FirebaseListAdapter.class.getSimpleName(); |
@@ -85,18 +85,6 @@ public void onDataChanged() { |
85 | 85 | }); |
86 | 86 | } |
87 | 87 |
|
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 | | - |
100 | 88 | /** |
101 | 89 | * @param activity The activity containing the ListView |
102 | 90 | * @param modelClass Firebase will marshall the data at a location into |
@@ -162,6 +150,18 @@ public View getView(int position, View view, ViewGroup viewGroup) { |
162 | 150 | return view; |
163 | 151 | } |
164 | 152 |
|
| 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 | + |
165 | 165 | /** |
166 | 166 | * This method will be triggered in the event that this listener either failed at the server, |
167 | 167 | * or is removed as a result of the security and Firebase Database rules. |
|
0 commit comments