Skip to content

Instantly share code, notes, and snippets.

@Richie97
Created October 30, 2013 02:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Richie97/7226214 to your computer and use it in GitHub Desktop.
Save Richie97/7226214 to your computer and use it in GitHub Desktop.
Pager that peeks on either side
int pagerWidth = size.x - getResources().getDimensionPixelSize(R.dimen.hero_pager_margins);
pager.setLayoutParams(new RelativeLayout.LayoutParams(Math.max(pagerWidth, 1), getResources().getDimensionPixelSize(R.dimen.hero_pager_height)));
pager.setClipChildren(false);
pager.setPageMargin(-getResources().getDimensionPixelSize(R.dimen.hero_pager_margins));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment