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
This issue is even easier to solve. You can apply necessary padding to the RecylerView
itself and set clipToPadding
to false, otherwise, the padding will chop off your scrolling area. Here is an example
See the padding will add 4dp on all sides including top and bottom. Then the clipToPadding parameter makes sure your child items are not chopped off. Now, add 4dp
padding to all sides for your child items, and you are good to go. In total you get 8dp padding on sides and between items.