public class RecyclerBinderUpdateCallback<T>
extends java.lang.Object
ListUpdateCallback
that generates the relevant Component
s
when an item is inserted/updated.
The user of this API is expected to provide a ComponentRenderer implementation to build a Component from a generic model object.
Modifier and Type | Class and Description |
---|---|
static class |
RecyclerBinderUpdateCallback.ComponentContainer |
static interface |
RecyclerBinderUpdateCallback.ComponentRenderer<T> |
static class |
RecyclerBinderUpdateCallback.Operation |
static interface |
RecyclerBinderUpdateCallback.OperationExecutor |
Constructor and Description |
---|
RecyclerBinderUpdateCallback(java.util.List<? extends T> prevData,
java.util.List<? extends T> nextData,
RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer,
RecyclerBinder recyclerBinder) |
RecyclerBinderUpdateCallback(java.util.List<? extends T> prevData,
java.util.List<? extends T> nextData,
RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer,
RecyclerBinderUpdateCallback.OperationExecutor operationExecutor) |
Modifier and Type | Method and Description |
---|---|
void |
applyChangeset(ComponentContext c) |
void |
onChanged(int position,
int count,
java.lang.Object payload) |
void |
onInserted(int position,
int count) |
void |
onMoved(int fromPosition,
int toPosition) |
void |
onRemoved(int position,
int count) |
public RecyclerBinderUpdateCallback(java.util.List<? extends T> prevData, java.util.List<? extends T> nextData, RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer, RecyclerBinder recyclerBinder)
public RecyclerBinderUpdateCallback(java.util.List<? extends T> prevData, java.util.List<? extends T> nextData, RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer, RecyclerBinderUpdateCallback.OperationExecutor operationExecutor)
public void onInserted(int position, int count)
public void onRemoved(int position, int count)
public void onMoved(int fromPosition, int toPosition)
public void onChanged(int position, int count, java.lang.Object payload)
public void applyChangeset(ComponentContext c)