Skip to content
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

Closed
XtreeIvI opened this issue Apr 24, 2017 · 7 comments

Comments

@XtreeIvI
Copy link

commented Apr 24, 2017

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.

@rubensousa

This comment has been minimized.

Copy link
Owner

commented May 1, 2017

I don't understand why Gravity.CENTER support should be added. Care to explain an use case for this?

@XtreeIvI

This comment has been minimized.

Copy link
Author

commented May 3, 2017

actually Gravity.CENTER with ability to snap for first and last item. LinearSnapHelper does not support snap for side items.

@bobymicroby

This comment has been minimized.

Copy link

commented May 3, 2017

in LinearSnapHelper you dont have the snapListener, so +1 for Gravity.CENTER :)

@rubensousa

This comment has been minimized.

Copy link
Owner

commented May 3, 2017

@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.

@GLiccardo

This comment has been minimized.

Copy link

commented May 15, 2017

actually Gravity.CENTER with ability to snap for first and last item. LinearSnapHelper does not support snap for side items.

+1
It is important when you have the first and last items with margins to screen edges

@rubensousa rubensousa added the wontfix label Jun 17, 2017
@rubensousa rubensousa closed this Jun 17, 2017
@rubensousa rubensousa added enhancement and removed wontfix labels Aug 30, 2019
@rubensousa rubensousa added this to the 2.2.0 milestone Aug 30, 2019
@rubensousa

This comment has been minimized.

Copy link
Owner

commented Aug 30, 2019

@XtreeIvI this will be added in 2.2.0

@rubensousa

This comment has been minimized.

Copy link
Owner

commented Aug 31, 2019

Released in 2.2.0. Just pass Gravity.CENTER and you get this behavior by default

@rubensousa rubensousa closed this Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.