Margin/padding in last Child in RecyclerView

前端 未结 9 981
醉话见心
醉话见心 2021-01-30 05:56

I\'m trying to add Padding/Margin Bottom in the last row and Padding/Margin Top in the first row. I can not do it in the item xml as it would affect all of my Children.

I

9条回答
  •  一整个雨季
    2021-01-30 06:35

    Instead of adding padding to both the top and bottom items, You can just add the padding to the top and bottom of your RecyclerView and set the clipToPadding attribute to false.

    
    

提交回复
热议问题