question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android doesn't fire snap event for the last item when scrolled all the way

See original GitHub issue

Is 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 ([]).)

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

reproduce

Reproducible Demo

Here is the demo

Steps to Reproduce

I think the steps are fairly simple

  1. Create a carousel smaller than the width of the screen with three views in it.
  2. Move to the middle view.
  3. 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:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
CoenWarmercommented, May 7, 2020

I believe the same happens on Android when scrolling past the first item. The callback isn’t fired then either.

1reaction
CoenWarmercommented, Jun 9, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found