ChipsLayoutManager icon indicating copy to clipboard operation
ChipsLayoutManager copied to clipboard

Combine notifyItemMoved() and notifyItemChanged()

Open techehcet opened this issue 7 years ago • 1 comments

Sometimes I have an item which moves position and also changes appearance at the same time. I've tried calling both notify methods but this totally messes up the animation.

I imagine this is quite a common scenario.

Ideally, the item would animate to the new appearance as it moves. However, the appearance changing suddenly at the start or end of the move would also be acceptable to me.

Is there any workaround?

techehcet avatar Jan 01 '17 10:01 techehcet

Seems it is working as you expected. I've created branch for you in sample https://github.com/BelooS/ChipsLayoutManager/tree/test/notifyChange%26move. Try to move some item with move button.

Before move i call notifyItemChanged with the old position and then notifyItemMoved. See it in ItemsFragment.

BelooS avatar Jan 11 '17 10:01 BelooS