How to show a fixed number of row elements in recyclerview

I am trying to make a menu footer that has 10 buttons and can be horizontal.

Therefore, I use recyclerview for this. I want this default footer to always show only the first 5 elements on the screen with all screen sizes, and the user can scroll through it.

So I have a question

  • How to show a fixed number of row elements in recyclerview?

  • How to set distance to 2 items in recyclerview list?

Thanks for reading.

+4
source share

All Articles