Java Code Examples for android.support.v7.util.ListUpdateCallback#onChanged()

The following examples show how to use android.support.v7.util.ListUpdateCallback#onChanged() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RepositoryAdapterFineGrainedEventsTest.java    From agera with Apache License 2.0 5 votes vote down vote up
private static void applyPresenter1FromAToBChanges(@NonNull final ListUpdateCallback callback) {
  // From count 1 to count 3:
  // [X] -> [Y, X]
  callback.onInserted(0, 1);
  // [Y, X] -> [Y, X']
  callback.onChanged(1, 1, PAYLOAD_PRESENTER_1_VALUE_A_TO_B);
  // [Y, X] -> [Y, X', Z]
  callback.onInserted(2, 1);
}
 
Example 2
Source File: RepositoryAdapterFineGrainedEventsTest.java    From agera with Apache License 2.0 4 votes vote down vote up
private static void applyPresenter1RefreshBChanges(@NonNull final ListUpdateCallback callback) {
  // From count 3 to count 3:
  // [Y, X', Z] -> [Y', X'', Z]
  callback.onChanged(0, 2, PAYLOAD_PRESENTER_1_VALUE_B_REFRESH);
}
 
Example 3
Source File: RepositoryAdapterFineGrainedEventsTest.java    From agera with Apache License 2.0 4 votes vote down vote up
private static void applyPresenter2RefreshBChanges(
    final int offset, @NonNull final ListUpdateCallback callback) {
  // From count 5 to count 5: blanket change
  callback.onChanged(offset, 5, PAYLOAD_PRESENTER_2_VALUE_B_REFRESH);
}