Skip to content

Instantly share code, notes, and snippets.

@Dmuasya
Created December 22, 2020 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dmuasya/10abee665f1a636f138767cb048cdd38 to your computer and use it in GitHub Desktop.
Save Dmuasya/10abee665f1a636f138767cb048cdd38 to your computer and use it in GitHub Desktop.
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
ViewGroup.LayoutParams params = mViewPager.getLayoutParams();
params.height = getMeasuredHeight() - mNav.getMeasuredHeight();
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh)
{
super.onSizeChanged(w, h, oldw, oldh);
mTopViewHeight = mTop.getMeasuredHeight();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment