SnappingList icon indicating copy to clipboard operation
SnappingList copied to clipboard

Question: is it possible to avoid "wobbly" scrolling ?

Open AndroidDeveloperLB opened this issue 5 years ago • 9 comments

Seems when I scroll to the beginning/end, it has a "wobbly" scroll (like on IOS) instead of just stopping me :

2018-11-26_17-28-36

Is there a way to avoid it?

AndroidDeveloperLB avatar Nov 26 '18 15:11 AndroidDeveloperLB

Given that the code relies on the method smoothScrollBy provided by ReciclerView, I don't think that can be changed without implementing it completely.

https://github.com/plattysoft/SnappingList/blob/a825d0c85cb47d2dc772b6f2de26905ba0c39d98/SnappingList/src/main/java/com/plattysoft/snappinglist/MainActivity.java#L97

plattysoft avatar Nov 26 '18 16:11 plattysoft

Is there maybe another alternative then? I want to achieve something like that:

aoxqg

AndroidDeveloperLB avatar Nov 26 '18 17:11 AndroidDeveloperLB

That sounds like sharp scroll. Maybe there's another method on the sdk of the compat library for that behavior

On Mon, 26 Nov 2018, 17:48 AndroidDeveloperLB, [email protected] wrote:

Is there maybe another alternative then? I want to achieve something like that:

[image: aoxqg] https://user-images.githubusercontent.com/5357526/49025696-de38e000-f1a4-11e8-92e3-1638dcf7f0bb.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/plattysoft/SnappingList/issues/1#issuecomment-441732064, or mute the thread https://github.com/notifications/unsubscribe-auth/ABo0ce0V6hRZcBDoLVw3QfqBvKrZ-oKXks5uzClVgaJpZM4YzQfv .

plattysoft avatar Nov 26 '18 20:11 plattysoft

Do you know what? Are there other solutions to this? Maybe not what you have on the repository?

AndroidDeveloperLB avatar Nov 26 '18 22:11 AndroidDeveloperLB

I've made a question about it here: https://stackoverflow.com/q/53483268/878126

AndroidDeveloperLB avatar Nov 26 '18 22:11 AndroidDeveloperLB

You can try replacing smoothScrollTo with scrollTo on the line I pointed at in my previous reply: https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html#scrollto

plattysoft avatar Nov 27 '18 12:11 plattysoft

It doesn't help. It moves even worse. See video: device-2018-11-30-013732.zip

AndroidDeveloperLB avatar Nov 29 '18 23:11 AndroidDeveloperLB

Well, it is a not-wobbly, which is what you asked for. Maybe you should just go for a ViewPager or a TabStrip instead. I would prefer ViewPager unless your views are smaller than the screen, then is when things get complicated.

plattysoft avatar Nov 30 '18 09:11 plattysoft

It goes beyond its boundary, like on IOS. Now it's worse as it just skips to the boundary from time to time.

AndroidDeveloperLB avatar Nov 30 '18 12:11 AndroidDeveloperLB