How to add dividers and spaces between items in RecyclerView?

前端 未结 30 2884
清歌不尽
清歌不尽 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:23

    This doesn't actually solve the problem, but as a temporary workaround, you can set the useCompatPadding property on the card in your XML layout to make it measure the same as it does on pre-Lollipop versions.

    card_view:cardUseCompatPadding="true"
    

提交回复
热议问题