public class AdapterUtil
extends java.lang.Object
| Constructor and Description |
|---|
AdapterUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.SortedSet<java.lang.Integer> |
adjustPosition(java.util.Set<java.lang.Integer> positions,
int startPosition,
int endPosition,
int adjustBy)
internal method to handle the selections if items are added / removed
|
static android.util.SparseIntArray |
adjustPosition(android.util.SparseIntArray positions,
int startPosition,
int endPosition,
int adjustBy)
internal method to handle the selections if items are added / removed
|
static void |
handleStates(FastAdapter fastAdapter,
int startPosition,
int endPosition)
internal method which correctly set the selected state and expandable state on the newly added items
|
public static void handleStates(FastAdapter fastAdapter, int startPosition, int endPosition)
fastAdapter - the fastAdapter which manages everythingstartPosition - the position of the first item to handleendPosition - the position of the last item to handlepublic static java.util.SortedSet<java.lang.Integer> adjustPosition(java.util.Set<java.lang.Integer> positions,
int startPosition,
int endPosition,
int adjustBy)
positions - the positions map which should be adjustedstartPosition - the global index of the first element modifiedendPosition - the global index up to which the modification changed the indices (should be MAX_INT if we check til the end)adjustBy - the value by which the data was shiftedpublic static android.util.SparseIntArray adjustPosition(android.util.SparseIntArray positions,
int startPosition,
int endPosition,
int adjustBy)
positions - the positions map which should be adjustedstartPosition - the global index of the first element modifiedendPosition - the global index up to which the modification changed the indices (should be MAX_INT if we check til the end)adjustBy - the value by which the data was shifted