##Issue clearing view when invalidating PagedListAdapter
Start with conventional paging library setup with PagedListAdapter
, DataSource
, DataSourceFactory
, and RecyclerView
all per the docs
The list loads data just fine. I then am notified that a new item has been added to the backing data so I call invalidate
on the DataSource
.
However I momentarily see the entire list clears as new data is loaded.
You can see this in example.mp4. The list initially loads 10 items per page. Then when the "invalidate" is trigged, the whole list clears. Only after fetching new items does the "new" data appear.
The biggest problem is that it's causing the Adapter to re-bind each of my ViewHolders
which (not shown in sample code) is triggering a lot of wasted work.