FancyAdapters icon indicating copy to clipboard operation
FancyAdapters copied to clipboard

DataChangeObserver in SelectableAdapter

Open lexius opened this issue 7 years ago • 2 comments

DataChangeObserver in SelectableAdapter must implement

public void onItemRangeChanged(int positionStart, int itemCount) public void onItemRangeChanged(int positionStart, int itemCount, Object payload) public void onItemRangeInserted(int positionStart, int itemCount) public void onItemRangeRemoved(int positionStart, int itemCount) public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount)

lexius avatar Sep 04 '16 14:09 lexius

These methods are already implemented, and left blank in the base class.

MikiLoz92 avatar Nov 06 '16 22:11 MikiLoz92

Sorry, I didn't understand the significance of the bug until now. At the moment I've implemented onItemRangeInserted, onItemRangeRemoved and onItemRangeMoved. I have not implemented the two variants of onItemRangeChanged because I don't see the point in doing it: a data change in a range of items should not affect the selection status of those items, nor modify the selected ArrayList size. I, at least, fail to see any potential use case.

MikiLoz92 avatar Nov 12 '16 15:11 MikiLoz92