Recycling Center is a library designed to support a pattern: reactive, unidirectional data flow using immutable ViewModels. It combines the reactive data flow of RxJava with the efficient UI of a RecyclerView, and supports UI composition via Sections of Views and ViewModels.
The Recycling Center uses several primitives to create an efficient
See the Adding a Custom View guide for how they fit together.
- AdapterViewType: Each view in the RecyclerView has an enumerated type.
- AdapterViewModel: Contains all the data needed to render a view, ideally including any formatting.
Binding code that connects a
The Recycling Center
RecyclerView.Adapter adhere to the
There are a few different adapters for different use-cases:
- BindingViewModelAdapter: Basic adapter mapping a List of ViewModels in a RecyclerView.
- SectionedRecyclerViewAdapter: A sectioned ViewModelAdapter.
A sectioned adapter powered by
Instead of Lists of ViewModels, the Recycling Center uses a
interface to bring content to an Adapter. This simplified interface
supports simple list-based binding via
or efficient, fluid binding from a
Cursor or other seekable stream of data.