Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

recyclerview ItemAnimator #7

Closed
DJafari opened this issue Sep 14, 2015 · 3 comments
Closed

recyclerview ItemAnimator #7

DJafari opened this issue Sep 14, 2015 · 3 comments

Comments

@DJafari
Copy link

DJafari commented Sep 14, 2015

when i use custom itemAnimator, i must use notifyItemInserted and notifyItemRemoved instead of notifyDataSetChanged in adapter, in smart adapter how can do it ?

thanks

@mrmans0n
Copy link
Owner

Get the adapter (it is returned by default) and save it in a variable so you can access it later. In the adapter you can access all those functions by yourself I guess.

Although I think you couldn't avoid it to call notifyDataSetChanged. I will flag this message so I remove those automatic calls for the next version of the library (or put them under a configurable flag so it is enabled by default but can be disabled).

@DJafari
Copy link
Author

DJafari commented Sep 14, 2015

thanks, i will wait for it

@mrmans0n
Copy link
Owner

Now you can call yourAdapter.setAutoDataSetChanged(false) and do the notifyItemInserted and notifyItemRemoved you need by hand. It's live on version 1.1.2 of the library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants