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 |
Modifier and Type | Method and Description |
---|---|
static <T> RecyclerBinderUpdateCallback<T> |
acquire(int oldDataSize,
List<T> data,
RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer,
RecyclerBinder recyclerBinder) |
static <T> RecyclerBinderUpdateCallback<T> |
acquire(int oldDataSize,
List<T> data,
RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer,
RecyclerBinderUpdateCallback.OperationExecutor operationExecutor,
int headOffset) |
void |
applyChangeset() |
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) |
static <T> void |
release(RecyclerBinderUpdateCallback<T> updatesCallback) |
public static <T> RecyclerBinderUpdateCallback<T> acquire(int oldDataSize, List<T> data, RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer, RecyclerBinder recyclerBinder)
public static <T> RecyclerBinderUpdateCallback<T> acquire(int oldDataSize, List<T> data, RecyclerBinderUpdateCallback.ComponentRenderer<T> componentRenderer, RecyclerBinderUpdateCallback.OperationExecutor operationExecutor, int headOffset)
public static <T> void release(RecyclerBinderUpdateCallback<T> updatesCallback)
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()