Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.0.0-rc4] updateDataSet calls animation when 'animate' parameter is 'false' #541

Closed
Str4tocaster opened this issue Feb 14, 2018 · 2 comments
Labels

Comments

@Str4tocaster
Copy link

Hello. I try to use FlexibleAdapter in our XMPP-client app - Xabber.
I have: compileSdkVersion 26, test on API 25
I enjoy to work with this adapter, but i also have one trouble.

When i call adapter.updateDataSet(items, false) - recyclerView always start update animation, although i set animate: false. Update animation do not start only if i called recyclerVIew.setItemAnimator(null). But in this case recyclerView do not have all animations.

I need to have all standard animations except update animation. How can I achieve this behavior?Thanks.

@Str4tocaster
Copy link
Author

I found information about it in #230. So i just set stableids = false in FlexibleAdapter constructor and this works like i need.
But i have one question - if i set stableids = false, is it reduce list performance? Thanks.

@davideas
Copy link
Owner

@Str4tocaster, Thank you for your choice.
In issue #230 I talked about setting stableIds true, so only the newly added/removed items will animate. Indeed having false it is like to call directly notifyDataSetChanged() (updateDataSet() calls it) that will bound again all items, so performance are reduced.

With stableIds = true, the RecyclerView will be responsible to find the new items and will animate only them.
To know more I invite you to make some combination experiments with these 2 flags: stableIds (constructor) and animate (updateDataSet).

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

No branches or pull requests

2 participants