SortedList
A Sorted list implementation that can keep items in order and also notify for changes in the list such that it can be bound to a RecyclerView.Adapter.
It keeps items ordered using the compare method and uses binary search to retrieve items. If the sorting criteria of your items may change, make sure you call appropriate methods while editing them to avoid data inconsistencies.
You can control the order of items and change notifications via the Callback parameter.
Types
Link copied to clipboard
A callback implementation that can batch notify events dispatched by the SortedList.
Link copied to clipboard
The class that controls the behavior of the SortedList.
Properties
Link copied to clipboard
Used by indexOf when the item cannot be found in the list.
Functions
Link copied to clipboard
Batches adapter updates that happen after calling this method and before calling endBatchedUpdates.
Link copied to clipboard
Ends the update transaction and dispatches any remaining event to the callback.
Link copied to clipboard
This method can be used to recalculate the position of the item at the given index, without triggering an onChanged callback.
Link copied to clipboard
Removes the item at the given index and calls onRemoved.
Link copied to clipboard
Replaces the current items with the new items, dispatching ListUpdateCallback events for each change detected as appropriate.
Link copied to clipboard