I setup my ViewPager
to only show preview of 1 page on the right side using setPadding
and pageMargin
:
viewpager.setPadding(smallSpace, smallSpace, largeRightPadding, smallSpace)
viewpager.pageMargin = normalSpace
viewpager.offscreenPageLimit = 2
largeRightPadding
is large enough to show my right preview page. My current UI looks like this:
This is how the first item with right preview looks:
If I scroll to the last item, there will be empty space on the right
I want to make it likes this, NO empty space for the last item, instead it will show the preview of the left page
Thanks in advance