-
Notifications
You must be signed in to change notification settings - Fork 292
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
Allow a variant of update
that is akin to clear+addAll, but using notifyDataSetChanged()
#365
Comments
I'd welcome such refresh functionality too. It'd be handy for re-ordering lists. |
Note to self that it should also be considered for sections (#369) and not just adapter level. |
There is a list reordering sample in However, this is added, and will be released in the next release (whenever that happens). |
Hi @Zhuinden , thanks for implementing this. Any chance when it can be released? I'm also in urgent need of this functionality. Thanks! |
I'll try to figure out your other issue first, if that happens then I'll figure out how to make a new release and provide it over Bintray, as I was considering creating a recyclerview-selection integration but I hear that releasing new artifacts is tricky, so that is postponed for now, and the core will not depend on that lib for sure |
If I did every step correctly, 2.9.0 is released with this feature. The bug fix to the other reported issue should go in |
Confirm, in 2.9.0 this feature is available. Thanks for releasing! |
To replace a list of items with a new list of items without using
update
(DiffUtil), I'm trying to useclear()
thenaddAll()
, however, this kills the scroll position on update.Kinda like the (unfortunately private)
setNewGroups
method ofGroupAdapter
, I'd love to do:adapter.replaceItems(Collection<? extends Group>)
But using
adapter.notifyDataSetChanged
so that scroll position is preserved.Currently I'm using a workaround
But I'm not really a fan of it, as there's a good chance this is unpredictable with non-LinearLayoutManagers.
The text was updated successfully, but these errors were encountered: