observableArrayList.addOnListChangedCallback(object :
ObservableList.OnListChangedCallback<ObservableList<String>>() {
override fun onChanged(sender: ObservableList<String>?) {
...
}
override fun onItemRangeRemoved(sender: ObservableList<String>?, positionStart: Int, itemCount: Int) {
...
}
override fun onItemRangeMoved(
sender: ObservableList<String>?,
fromPosition: Int,
toPosition: Int,
itemCount: Int
) {
...
}
override fun onItemRangeInserted(sender: ObservableList<String>?, positionStart: Int, itemCount: Int) {
...
}
override fun onItemRangeChanged(sender: ObservableList<String>?, positionStart: Int, itemCount: Int) {
...
}
})
Leave a comment