Using a single RecyclerView.Adapter for multiple RecyclerViews

浪尽此生 提交于 2020-01-03 16:54:47

问题


What I've done: I have a viewpager with 4 fragments which inflate the same layout containing a RecyclerView. I've built a single Adapter for all of the fragments. When I click an item it loads data and appends the data to a List and set the new data to the adapter.

Problem: the problem is when I change the data of particular recyclerview of a particular fragment the changes take effect on all the recyclerviews.

来源:https://stackoverflow.com/questions/28472702/using-a-single-recyclerview-adapter-for-multiple-recyclerviews

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!