Recyclerview not call any Adapter method :onCreateViewHolder,onBindViewHolder,

前端 未结 8 1894
灰色年华
灰色年华 2020-12-01 08:54

my RecyclerView do not call onCreateViewHolder, onBindViewHolder, therefore, does not appear nothing in recyclerview. I put logs for debugging, and no log is shown. What can

8条回答
  •  无人及你
    2020-12-01 09:20

    Is kind of silly, but another thing that can block the calls to the methods is to declare the visibility of the view as GONE.

    android:visibility="gone"
    
    recyclerView.setVisibility(View.GONE);
    

    Any of these will block the call of the methods in RecyclerView.Adapter

    I hope it can help someone.

提交回复
热议问题