FirebaseRecyclerAdapter - populateViewHolder is not populating the data for first time it runs?

拜拜、爱过 提交于 2019-11-28 14:01:22
Prashanth

Found the Solution.

The Problem is RecyclerView had a height of wrap_content. So Please make sure your RecyclerView height is set to match_parent. This will fix this issue.

<android.support.v7.widget.RecyclerView
    android:id="@+id/recycler_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scrollbars="vertical" />
Lucas E. Saavedra

If you don't want to use match_parent you shouldn't call mRecycler.setHasFixedSize(true);

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