-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to snap every X views? #32
Comments
This would require another custom SnapHelper. I don't have any plans to implement this, though. |
Too bad. Thanks anyway |
@AndroidDeveloperLB , I'm adding something similar in 2.2.0. It'll not be exactly snapping on X views, but instead limiting the fling distance. You'll also be able to customise the snap speed: |
Check this issue: #29 |
Why close it if it's not the same? |
It's not released yet, but it's in the develop branch if you want to check it out. I closed the issue again since it's not really what you asked for, although it's similar. That's why I linked the other issue. Here's a preview: https://drive.google.com/file/d/1vbJ5jz39cCcVgWIeGRv5vWF5ESOglDCr/view |
It's not the same? |
I closed it since I don't have plans to work on this specific feature at the moment. You closed this the last time because of that same reason |
Sorry I don't remember. |
You wanted to snap every X views, however I've added support for limiting the maximum fling according to a value you can set through: https://github.com/rubensousa/RecyclerViewSnap/blob/decfb4102dcd8d741cce65f88e2d82e768d840b7/gravitysnaphelper/src/main/java/com/github/rubensousa/gravitysnaphelper/GravitySnapHelper.java#L274 Limiting snapping on every X view is different, since you may have views with different width. |
Oh right. |
Because it requires time I don't have at the moment. However, I could leave this open so that anyone else could work on this instead. Meanwhile, If you need something similar, you could use the other approach. |
OK please let it be open, then. |
@rubensousa
My view in XML:
My goal is to go through the list one by one. This is my current implementation: That is what I want to have: |
@albka1986 for that use case, you need custom touch event handling. It's not possible to scroll one item only. For that, you need PagerSnapHelper. Check this StackOverflow question: https://stackoverflow.com/questions/53483268/how-to-have-recyclerview-snapped-to-center-and-yet-be-able-to-scroll-to-all-item/53510142#53510142 |
Thanks |
For example, suppose I have tens of views to scroll through. If the user scrolled x/2 and a bit more, it will get to the X view.
The text was updated successfully, but these errors were encountered: