Fix various edge to edge bugs.

This commit is contained in:
Greyson Parrelli
2026-07-28 14:55:23 -04:00
parent a9a8ec7f5d
commit 1b206ddc70
8 changed files with 89 additions and 21 deletions
@@ -261,13 +261,23 @@ public class StickyHeaderGridLayoutManager extends RecyclerView.LayoutManager im
requestLayout();
}
/**
* <p>Rows are laid out, and recycled, against {@code getPaddingTop()} and
* {@code getHeight() - getPaddingBottom()}. That is the right boundary while the padding clips, but when it
* does not -- the usual edge-to-edge setup, where the list is padded by the navigation bar inset and draws
* behind it -- the padded strips are visible, so a row treated as off screen there pops into existence in
* plain sight. Extending the boundaries by the padding makes rows scroll through those strips instead.
*/
private int getExtraLayoutSpace(RecyclerView.State state) {
if (state.hasTargetScrollPosition()) {
return getHeight();
}
else {
else if (getClipToPadding()) {
return 0;
}
else {
return Math.max(getPaddingTop(), getPaddingBottom());
}
}
@Override