Open vanjavanjavanja opened 8 years ago
Up this problem
Does anyone support the lib?
Hey anyone!
I'm having the same issue, could anyone help me out? Thank you!
I've faced the same issue and i'm using a hack to handle it. Something like this:
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
//hack: expand the header of Material ViewPager on tab selected
if (mScrollView != null) {
mScrollView.postDelayed(new Runnable() {
@Override
public void run() {
mScrollView.smoothScrollTo(0, 0);
}
}, 100);
}
}
Using this hack you can expand the header when a fragment is selected. Hope it helps!
@jintoga how to use this method.
Actual result: https://youtu.be/CPMFZ-bszAQ
Fragment code:
Layout:
Please help to understand what is wrong w/ my code, thanks!