Skip to content

Instantly share code, notes, and snippets.

@cliffgr
Created April 26, 2017 09:11
Show Gist options
  • Save cliffgr/119f5d7ecf922fad9ed777511ad77cc0 to your computer and use it in GitHub Desktop.
Save cliffgr/119f5d7ecf922fad9ed777511ad77cc0 to your computer and use it in GitHub Desktop.
test
int margin = getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin);
int width = mSessionManager.getWidthPixels() - margin;
// int width = (int) (mSessionManager.getWidthPixels() - margin * 3.7);
int height = (3 * width) / 4;
Context context = getActivity().getApplicationContext();
float heightDp = AppHelper.dpFromPx(context, height);
float overlapPagerMarginDp = (-42 * heightDp) / 220;
// float overlapPagerMarginDp = (-30 * heightDp) / 220;
mOverlapPagerMargin = AppHelper.pxFromDp(context, overlapPagerMarginDp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment