Closed changeYe closed 7 years ago
Hi @yuantongqin,
It's a known issue. I haven't had idea to fix it yet. I am sorry.
static int lastOffset = 0;
public static boolean syncOffset(SmoothAppBarLayout smoothAppBarLayout, View target, int verticalOffset, View scroll) {
boolean isSelected = target == scroll;
if (scroll instanceof NestedScrollView) {
NestedScrollView nestedScrollView = (NestedScrollView) scroll;
nestedScrollView.scrollTo(0, verticalOffset);
} else if (scroll instanceof RecyclerView) {
RecyclerView recyclerView = (RecyclerView) scroll;
recyclerView.scrollBy(0, verticalOffset - lastOffset);
}
lastOffset = verticalOffset;
return true;
}
I made some changes slightly, this way the effect is better than before, there may be a mistake
Hmmmmmm. Storing lastOffset as static may not be an effective way to do, imo. Would you mind to send PR? I will run the code based on your PR.
Thank you for your help, I look at the code yourself 🙂
Hi @yuantongqin, you can try original Support Library 26.0.0. The flinging issue of AppBarLayout is fixed.
SmoothViewPagerParallaxExitUntilCollapsedActivity: If I put CollapsingToolbarLayout height up to 500 dp, upward slide layout to the middle position, switch the TAB, if the child fragments of data is not much, TAB to slide down quickly.Sometimes, slide the TAB, the TAB will slide to the top quickly