Skip to content

Instantly share code, notes, and snippets.

@Dmuasya

Dmuasya/StickyNavLayout.java Secret

Created Dec 22, 2020
Embed
What would you like to do?
@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