I’ve always been slightly annoyed by the android o...
# compose-android
g
I’ve always been slightly annoyed by the android overscroll effect moving the top of the scrolling view so you can see behind it. Is there a nice way to avoid this?
a
I'd like to know as well. For now, I've worked around it by adding a dummy view with the same background under everything (Box).
g
Yeah, I’m going to that here. Probably going to drawRect something behind. But I’ve had the same issue with an image and the top of the screen for example.
a
The weird thing is, it doesn't always happen. And sometimes it happens even if it's not an overscroll, e.g. app bar collapsing makes a view anchored at the bottom to jump a bit.
Perhaps it has something to do with layout hierarchy
g
I think it’s fairly consistent. The scrolling view just stretches, but for some reason it does so from a different origin than the top of the view. I guess they thought the feel was nicer that way, but there’s this edge case
👍 1
m
If you're using compose, try by adding a background modifier to your scaffold...that should help
👍🏻 1