public class RecyclerBinderUpdateCallback<T> extends 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(List<? extends T> prevData,
List<? extends T> nextData,
RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer,
RecyclerBinder recyclerBinder) |
RecyclerBinderUpdateCallback(List<? extends T> prevData,
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,
Object payload) |
void |
onInserted(int position,
int count) |
void |
onMoved(int fromPosition,
int toPosition) |
void |
onRemoved(int position,
int count) |
public RecyclerBinderUpdateCallback(List<? extends T> prevData, List<? extends T> nextData, RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer, RecyclerBinder recyclerBinder)
public RecyclerBinderUpdateCallback(List<? extends T> prevData, 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, Object payload)
public void applyChangeset(ComponentContext c)