1

I am working on a freelance android project. I have a problem with changing margins between RecyclerView items as project design need. I want to show half of last visible item in screen so user can guess to scroll horizontally. I tried it with creating a custom RecyclerView.ItemDecoration. When screen first opened everything was okay but when I start to scroll horizontally on this RecyclerView, margin between items increased and sometimes decreased. How can I solve this problem with a general way. With image below you can see the my desired look. It is the first time when screen opened. Thanks everyone.

enter image description here

Fatih Taşdemir
  • 266
  • 1
  • 5
  • 15

1 Answers1

1

I don't have required reputation to comment on the post.

Put your layout code for recycler view items and ur adapter. Try resetting and setting the item's margin.

Check this [RecyclerView Item Alignment Going Wrong]:Android: RecyclerView content messed up after scrolling

Samrat
  • 578
  • 1
  • 5
  • 20