Wednesday 7 October 2015

View pager showing the next and previous page

Hi guys

i was woking on a project which have loads of fragments and the main constraint was having half of the other fragment view





To show preview of left and right pages set the following two values
  1. viewpager.setClipToPadding(false)
  2. viewpager.setPadding(left,0,right,0)
If you need space between two pages in the viewpager then add viewpager.setPageMargin(int)


 The code is available in git hub



Enjoy!!!!

No comments:

Post a Comment