How to add dividers and spaces between items in RecyclerView?

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

    As I have set ItemAnimators. The ItemDecorator don't enter or exit along with the animation.

    I simply ended up in having a view line in my item view layout file of each item. It solved my case. DividerItemDecoration felt to be too much of sorcery for a simple divider.

    
    

提交回复
热议问题