NearbyListUpdateCallback

ListUpdateCallback that dispatches update events to the given adapter.

This class is a wrapper around RecyclerView.Adapter that implements ListUpdateCallback. It is used to dispatch update events to the adapter when the underlying data changes.

It also handles updating the nearby items when an item is inserted or removed at the end of the list. This is to ensure that the dividers are drawn correctly.

Parameters

adapter

The adapter to dispatch update events to.

See also

Constructors

Link copied to clipboard
constructor(adapter: RecyclerView.Adapter<*>)

Functions

Link copied to clipboard
open override fun onChanged(position: Int, count: Int, payload: Any?)
Link copied to clipboard
open override fun onInserted(position: Int, count: Int)
Link copied to clipboard
open override fun onMoved(fromPosition: Int, toPosition: Int)
Link copied to clipboard
open override fun onRemoved(position: Int, count: Int)