public interface ChangeEventListener
| Modifier and Type | Interface and Description |
|---|---|
static class |
ChangeEventListener.EventType
The type of event received when a child has been updated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onCancelled(DatabaseError error)
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.
|
void |
onChildChanged(ChangeEventListener.EventType type,
int index,
int oldIndex)
A callback for when a child has changed in FirebaseArray.
|
void |
onDataChanged()
This method will be triggered each time updates from the database have been completely processed.
|
void onChildChanged(ChangeEventListener.EventType type, int index, int oldIndex)
type - The type of event receivedindex - The index at which the change occurredoldIndex - If type is a moved event, the previous index of the moved child.
For any other event, oldIndex will be -1.void onDataChanged()
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.
void onCancelled(DatabaseError error)
error - A description of the error that occurred