AdapterListUpdateCallback

class AdapterListUpdateCallback : ListUpdateCallback


ListUpdateCallback that dispatches update events to the given adapter.

Summary

Public constructors

Creates an AdapterListUpdateCallback that will dispatch update events to the given adapter.

Public functions

Unit
onChanged(position: Int, count: Int, payload: Any!)

Called when count} number of items are updated at the given position.

Unit
onInserted(position: Int, count: Int)

Called when count} number of items are inserted at the given position.

Unit
onMoved(fromPosition: Int, toPosition: Int)

Called when an item changes its position in the list.

Unit
onRemoved(position: Int, count: Int)

Called when count} number of items are removed from the given position.

Public constructors

AdapterListUpdateCallback

Added in 1.0.0
AdapterListUpdateCallback(adapter: RecyclerView.Adapter)

Creates an AdapterListUpdateCallback that will dispatch update events to the given adapter.

Parameters
adapter: RecyclerView.Adapter

The Adapter to send updates to.

Public functions

onChanged

Added in 1.4.0-alpha01
fun onChanged(position: Int, count: Int, payload: Any!): Unit

Called when count} number of items are updated at the given position.

onInserted

Added in 1.4.0-alpha01
fun onInserted(position: Int, count: Int): Unit

Called when count} number of items are inserted at the given position.

onMoved

Added in 1.4.0-alpha01
fun onMoved(fromPosition: Int, toPosition: Int): Unit

Called when an item changes its position in the list.

onRemoved

Added in 1.4.0-alpha01
fun onRemoved(position: Int, count: Int): Unit

Called when count} number of items are removed from the given position.