How to add dividers and spaces between items in RecyclerView?

前端 未结 30 3547
清歌不尽
清歌不尽 2020-11-22 03:27

This is an example of how it could have been done previously in the ListView class, using the divider and dividerHeight parame

30条回答
  •  梦谈多话
    2020-11-22 04:11

    I have added a line in list item like below

    
    

    1px will draw the thin line.

    If you want to hide the divider for the last row then divider.setVisiblity(View.GONE); on the onBindViewHolder for the last list Item.

提交回复
热议问题