RecyclerView doesn't load data in first launch using FirebaseRecyclerAdapter

前端 未结 2 1847
执笔经年
执笔经年 2021-01-22 03:36

I\'m using FirebaseRecyclerAdapter to populate a RecyclerView in a Fragment.

Here\'s my code

mDatabase = Firebase         


        
2条回答
  •  猫巷女王i
    2021-01-22 04:02

    Remove the recyclerView.setHasFixedSize(true) from your code and then check if the code works fine now.

    And for dismissing the ProgressBar, its good to set the visibility to GONE.

    mProgressBar.setVisibility(View.GONE);
    

    For more information you can see this Github link. I think the same issue is reported here.

提交回复
热议问题