Android doesn't fire snap event for the last item when scrolled all the way
See original GitHub issueIs this a bug report, a feature request, or a question?
This is a bug report, I have seen this but I am doubtful that it’s the same thing.
Have you followed the required steps before opening a bug report?
(Check the step you’ve followed - put an x
character between the square brackets ([]
).)
- I have read the guidelines regarding bug report.
- I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- I have searched for existing issues and made sure that the problem hasn’t already been reported.
- I am using the latest plugin version.
- I am following the issue template closely in order to produce a useful bug report.
Have you made sure that it wasn’t a React Native bug?
Yes.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
It’s only on Android.
Is the bug reproductible in a production environment (not a debug one)?
Yes, tried it with an assembled apk.
Environment
React: 16.8.6
React native: 0.60.5
react-native-snap-carousel: 3.9.0
Android: Seems to be all Android versions
Expected Behavior
When I swipe to the very last item I expect the snap events to fire even if I didn’t stop my finger immediately when the swipe was in place and that I wouldn’t have to nudge the carousel again to make it work.
Actual Behavior
Reproducible Demo
Here is the demo
Steps to Reproduce
I think the steps are fairly simple
- Create a carousel smaller than the width of the screen with three views in it.
- Move to the middle view.
- Move to the third view starting to hold it from the very right of the screen and not the third view itself and swipe it to the very left.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Android doesn't fire snap event for the last item when scrolled ...
Create a carousel smaller than the width of the screen with three views in it. Move to the middle view. Move to the...
Read more >Snappy scrolling in RecyclerView - android - Stack Overflow
I have an interface, ISnappyLayoutManager , which contains a method, getPositionForVelocity , which calculates at which position the view should ...
Read more >Handling Scrolls with CoordinatorLayout - CodePath Cliffnotes
When a CoordinatorLayout notices this attribute declared in the RecyclerView, it will search across the other views contained within it for any related...
Read more >Lists and grids | Jetpack Compose - Android Developers
Many apps need to display collections of items. This document explains how you can efficiently do this in Jetpack Compose.
Read more >Control scrolling in a CollectionView - .NET MAUI
When a user swipes to initiate a scroll, the end position of the scroll can be controlled so that items are fully displayed....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe the same happens on Android when scrolling past the first item. The callback isn’t fired then either.
@bd-arc thank you for your work on the library! It is by far the best carousel library for RN out there.
Is this particular bug on Android something that you want to address in version 4, or is this something that can be fixed in the current 3.x approach?