android-mvvm
android-mvvm copied to clipboard
Reactive list for recyclerview/viewpager
How about using a reactive list for populating the RecyclerViews and ViewPagers? Such as if you wanted to add or remove items from a list without redisplaying the entire list. Something like this.
Again, awesome library.
This is a great idea. It would also enable building an adapter that creates animates the changes in RecyclerView.
I think ReactiveList implementation should be a separate library. If there are already existing implementations, support can be integrated as an optional module.
With #40, one of the options that I am considering is using databinding.ObservableList as the base for setting up adapters. ObservableList implements the necessary callbacks mentioned by you. As its part of databinding, it won't impose any additional dependency on library consumers.
However, there are concerns (mentioned on that issue) which need to be addressed before this approach is implemented.
Hmm yes if I understand correctly I think ObservableList will do just what's needed, perfect.