Large gap forms between RecyclerView items when scrolling down

前端 未结 9 1973
别跟我提以往
别跟我提以往 2020-12-23 20:16

I\'m making a ToDo list app, and while testing it, for some reason, a huge gap forms between the items whenever I try to scroll down. It always happens whenever I Drag and D

9条回答
  •  感动是毒
    2020-12-23 20:59

    Its because you are using match_parent in height of root view of the row item in your vertically oriented listview/recyclerview. When you use that the item expands completely wrt to its parent. Use wrap_content for height when the recyclerview is vertically oriented and for width when it is horizantally oriented.

提交回复
热议问题