Android Architecture Component now introduced Paging Library, which is great.
According to the official demo The DataSource.Factory
now supports map
and mapByPage
methods, which means we may transform items in one DataSource
.
But DataSource
and DataSource.Factory
should be in the model layer, not the Presentor/View layer. However, there are plenty of times when we want to transform data in our Adapter(for RecyclerView or ListView), and obviously, this is the Presentor/View layer logic. By now, an Adapter holds an instance of PagedList
, but PageList
can't support these operations, which is kinda awkward. Besides, there are still times when we want to add items or remove items to/from a PagedList
.
So this is a feature request:
Support item transformations on a
PagedList
Support item adding/removing to/from a
PagedList
Any discussion is welcomed.