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?
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
gsala
10/02/2023, 5:23 PM
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
ascii
10/02/2023, 5:24 PM
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.
ascii
10/02/2023, 5:24 PM
Perhaps it has something to do with layout hierarchy
g
gsala
10/02/2023, 5:26 PM
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
Mahmoo
10/02/2023, 6:18 PM
If you're using compose, try by adding a background modifier to your scaffold...that should help