peek original post before scrolling
This commit is contained in:
parent
4956543eac
commit
579794d7e0
|
@ -573,9 +573,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||||
initiallyScrolled = true;
|
initiallyScrolled = true;
|
||||||
scrollView.post(() -> {
|
scrollView.post(() -> {
|
||||||
int bottom = scrollView.getChildAt(0).getBottom();
|
int bottom = scrollView.getChildAt(0).getBottom();
|
||||||
int sy = scrollView.getScrollY();
|
int delta = bottom - (scrollView.getScrollY() + scrollView.getHeight());
|
||||||
int sh = scrollView.getHeight();
|
int space = Math.min(V.dp(150), delta);
|
||||||
scrollView.scrollBy(0, bottom - (sy + sh));
|
scrollView.scrollBy(0, delta - space);
|
||||||
|
scrollView.postDelayed(() -> scrollView.smoothScrollBy(0, space), 150);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue