RecyclerView is cutting off the last item

前端 未结 19 2270
予麋鹿
予麋鹿 2020-12-02 18:47

I have a fragment with a toolbar and a recyclerView inside it.

I am populating the recyclerView with dummy data and then try to show them. For some reason, the last

19条回答
  •  醉酒成梦
    2020-12-02 18:53

    I know I am late, but today I faced the same issue. I have a ConstrantLayout, a toolbar, a recyclerview. So I used android:layout_height="match_parent", and to prevent the recyclerview from overlapping with the topbar, I used, app:layout_constraintTop_toBottomOf="@id/toolbar" android:layout_marginTop="?attr/actionBarSize"

    So the entire code looks something like this:

    
        
        
        
    
    
    

    I hope this is helpful.

提交回复
热议问题