when does getItemCount() method get called in RecycleView adapter?
问题 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