when does getItemCount() method get called in RecycleView adapter?

▼魔方 西西 提交于 2020-01-10 18:44:11

问题


I have a adapter which populates data to RecyclerView.

I am not calling notifyDataSetChanged() and I am setting the adapter to the RecyclerView in onCreateView() (so in getItemCount() should be called once) in Fragment but I find getItemCount() called multiple times.

来源:https://stackoverflow.com/questions/31748131/when-does-getitemcount-method-get-called-in-recycleview-adapter

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