MergeAdapter is a new class available in recyclerview - sequentially combine multiple adapters

I was reading new on android-news page where i cam to know that MergeAdapter is a new class available in recyclerview.

MergeAdapter is a new class available in recyclerview:1.2.0-alpha02 which enables you to sequentially combine multiple adapters to be displayed in a single RecyclerView. This enables you to better encapsulate your adapters rather than having to combine many data sources into a single adapter, keeping them focused and re-usable.

One benefit of this is you can display a list loading state in a header or footer: when the list is retrieving data from the network, we want to show a progress spinner; in case of error, we want to show the error and a retry button.



Do you want to know how this MergeAdapter works. Make sure to check out this page for more details.




Previous
Next Post »

Popular Posts