I’m using the new ViewPager-view from the Android compatibility library, and I can’t figure out how to get padding between the pages so that when you’re swiping between them, there’s a visible border.
My ViewPager width is set to fill_parent so it takes up the entire width of the display. I can get this border between the pages by setting android:padding on the ViewPager, but that has the added (unwanted) effect of reducing the visible size of the page when it is fully displayed.
I guess what I need is to introduce a border outside the width of the view somehow, if that even makes sense…
The new Android Market does this the way I’d like, but I just can’t figure out how it’s accomplished.
It seems that more recent releases of the support package (since revision 5) have added support for margins between pages of
ViewPagerviasetPageMargin()andsetPageMarginDrawable().