Is there some way to disable overScroll effect in ...
# compose
a
Is there some way to disable overScroll effect in HorizontalPager by Accompanist?
a
Copy code
CompositionLocalProvider(LocalOverScrollConfiguration provides null) {
        ...
    }
a
@Andrey Kulikov Thanks it worked. Btw it is possible to enable overScroll for only the first and last pages of the pager? Right now it shows this effect for all the intermediate pages as well.
a
what version of Pager do you use? I think you faced this issue https://github.com/google/accompanist/issues/767 which I can’t reproduce locally. If you can provide a sample code which reproduces it and share in the bug I can take a look!
a
I was using 0.20.0. Just updated to 0.20.2 and looks like it got fixed. No more reproducible. 😄 Had another small question. Right now if I fling lightly on a page, the page move a little bit and then comes back to its original position (shows some springy effect). How can I modify it to always move to next page even when I do a light fling (having small velocity)?
a
cc @cb. why do you want it? as a user I will not expect such behavior I think
a
Sometimes I gently swipe to the left or right and expect that I will move to the next page, but that doesn't happen, the page moves a little and then comes back. Then I realize that I need to put more effort and swipe a little more 😅. I was thinking if it is possible to change that threshold velocity which is required to switch pages. I checked few other apps which provide a pager with a tab layout and there I can change pages with the slightest swipe.
c
So this is due to a bug in Compose 1.0 where the historical velocity is a bit temperamental. This means that Snapper can't rely on the velocity for determining the current direction of the swipe, to know which direction to snap to. It currently just looks at whichever item is closer, which is as good as we can do while supporting Compose 1.0.
Issue 767 was fixed when we changed Pager to use Snapper (Snapper properly consumes velocity)
a
Hopefully, future versions of Compose will provide more flexibility on this. Attaching a video to give more context to the behavior I was referring to.
f
Sometimes I gently swipe to the left or right and expect that I will move to the next page, but that doesn't happen, the page moves a little and then comes back
I am having the exact same issue 😕
u
So this issue is not actually fixed yet?
331 Views