Package com.firebase.ui.common
Interface BaseChangeEventListener<S,E>
-
public interface BaseChangeEventListener<S,E>Event listener for changes in anBaseObservableSnapshotArray.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonChildChanged(ChangeEventType type, S snapshot, int newIndex, int oldIndex)A callback for when a child event occurs.voidonDataChanged()Callback triggered after all child events in a particular snapshot have been processed.voidonError(E e)Callback when an error has been detected in the underlying listener.
-
-
-
Method Detail
-
onChildChanged
void onChildChanged(@NonNull ChangeEventType type, @NonNull S snapshot, int newIndex, int oldIndex)A callback for when a child event occurs.- Parameters:
type- The type of the event.snapshot- The snapshot of the changed child.newIndex- The new index of the element, or -1 of it is no longer presentoldIndex- The previous index of the element, or -1 if it was not previously tracked.
-
onDataChanged
void onDataChanged()
Callback triggered after all child events in a particular snapshot have been processed.Useful for batch events, such as removing a loading indicator after initial load or a large update batch.
-
onError
void onError(@NonNull E e)Callback when an error has been detected in the underlying listener.- Parameters:
e- the error that occurred.
-
-