-
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
Center Snap with support to snap to edge items #21
Comments
I don't understand why Gravity.CENTER support should be added. Care to explain an use case for this? |
actually Gravity.CENTER with ability to snap for first and last item. LinearSnapHelper does not support snap for side items. |
in LinearSnapHelper you dont have the snapListener, so +1 for Gravity.CENTER :) |
@XtreeIvI, it doesn't make sense (in my opinion) to support CENTER and then snapping first and last items at the same time. That means it'll only be centered before the first scroll. After the first scroll, it'll either be snapped at START or END. I'll consider adding CENTER support to replace the need for using 2 different SnapHelpers. |
+1 |
@XtreeIvI this will be added in 2.2.0 |
Released in 2.2.0. Just pass Gravity.CENTER and you get this behavior by default |
GravirySnapHelper is awesome comparing to default LinearSnapHelper. But It would be perfect if it is support also Gravity.CENTER and simultaneously snap to first and last item if scrolled to one of the edges.
Regretfully LinearSnapHelper (though snap to center) can't snap to side items as your GravirySnapHelper does. So in order your GravirySnapHelper become far more superior you should add Gravity.CENTER. Thanks. Also I found that if I set snapToLastItem(true) it does not snap, though it snap to edge items by default.
The text was updated successfully, but these errors were encountered: