-
public interface BaseChangeEventListener<S, E>Event listener for changes in an BaseObservableSnapshotArray.
-
-
Method Summary
Modifier and Type Method Description abstract voidonChildChanged(@NonNull() ChangeEventType type, @NonNull() S snapshot, int newIndex, int oldIndex)A callback for when a child event occurs. abstract voidonDataChanged()Callback triggered after all child events in a particular snapshot have beenprocessed. abstract voidonError(@NonNull() E e)Callback when an error has been detected in the underlying listener. -
-
Method Detail
-
onChildChanged
abstract 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 notpreviously tracked.
-
onDataChanged
abstract void onDataChanged()
Callback triggered after all child events in a particular snapshot have beenprocessed.
Useful for batch events, such as removing a loading indicator after initial loador a large update batch.
-
-
-
-