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.

snapToItem/snapToNext not working on Android devices when called from callbacks inside step

See original GitHub issue

Is this a bug report, a feature request, or a question?

Bug report

Have you followed the required steps before opening a 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?

Android only.

Is the bug reproductible in a production environment (not a debug one)?

I think so.

Environment

Expo with v33 SDK

Expected Behavior

It should go to specified page or to the next.

Actual Behavior

On iOS device it is working fine, but on Android nothing happens.

Reproducible Demo

https://snack.expo.io/SJxF4GwlB

Steps to Reproduce

  1. Run on Android
  2. Try to snapToItem from inside single page view.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:17
  • Comments:46 (9 by maintainers)

github_iconTop GitHub Comments

106reactions
calz10commented, Jul 4, 2019
setTimeout(() => this.carouselComponent.snapToNext(), 250)

adding timeout in the current version works for me 😃 less than 250 will not snap to next

9reactions
nathantqncommented, Oct 22, 2019

This workaround setTimeout(() => this.carousel.snapToPrev(), 0) is still needed in "react-native-snap-carousel": "^3.8.2", 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

snapToItem/snapToNext not working on Android devices ...
snapToItem/snapToNext not working on Android devices when called from callbacks inside step #552. Open. 5 tasks done.
Read more >
Android Facebook SDK does not call callback after login
I am trying to make a class that handles Facebook logins in my application. My problem is it doesn't ...
Read more >
Using Callbacks in TestStand - NI - National Instruments
Callbacks are sequences that TestStand calls under specific circumstances. ... of steps and the loading and unloading of sequence files.
Read more >
Callback is not working! | 3CX Forums
Dear, I configured the callback im my queue, but this working only with internal calls (extension to extension). How to made to working...
Read more >
MediaSessionCompat.Callback - Android Developers
androidx.work ... Callbacks keep internal reference to the session when it's set, ... Called when a MediaControllerCompat wants a PlaybackStateCompat.
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