Boundary between viewpager2 item without cutting from the item width

150 views Asked by At

I have a viewpager2 with customTransformer that works fine, the issue is i can't define margin between items so it only shows 1 item at a time (i don't want to see the preview of the swiped item) , i tried with setPadding(12,0,0,0) and what it actually did ,it cut from the width of my item. i couldn't find how to use margin in itemdecoration so it could set a larger margin between th eitems, anybody have an idea ?

1

There are 1 answers

0
joghm On

I ended up editing my own custom hinge depth page Transformer by setting up the spacing needed for between items to translationX = spacingValue