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.

Carousel doesn't swipe left or right on Android

See original GitHub issue

Hey team! Thanks for the great library. I’m excited to integrate it into my project!

I’m struggling to make the Carousel swipe left and right on Android. It works fine on iOS. Here’s the code:

        <Carousel
          ref={ref}
          data={images}
          renderItem={({ item }) => (
            <View
              style={{
                flex: 1,
                justifyContent: "center",
                alignItems: "center",
              }}
            >
              <Image
                source={{ uri: item.url }}
                style={{
                  height: (Dimensions.get("window").width * 9) / 16,
                  width: Dimensions.get("window").width,
                }}
              />
            </View>
          )}
          width={Dimensions.get("window").width}
          height={(Dimensions.get("window").width * 9) / 16}
          mode="parallax"
          enabled={true}
        />

Expected behavior: the carousel should scroll left and right when I swipe left and right.

Actual behavior: the carousel doesn’t react at all to my swipe gestures on Android. It works fine on iOS.

I’m 99% certain I’ve misconfigured my Carousel instance and just haven’t found the correct solution yet. 😅

How do I implement swiping between items in my carousel on Android?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
dillonforrestcommented, Sep 15, 2022

Wrapping my app with GestureHandlerRootView worked for me! 谢谢 @dohooo 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make Bootstrap carousel slider use mobile left/right ...
I just tried this using Bootstrap v4.0.0-alpha.5 and jQuery 3.1.1. Swiping is working fine on my Android smartphone and rendering automatically ...
Read more >
Carousel does not swipe right when its gets to the 3 image it ...
Un able to swipe right when i get to the third image on android... swipe right doesnot seems to work when i am...
Read more >
Android: Swipe Gesture left/right not working - Ranorex Forum
-The app I'm testing contains a carousel layout that lets you swipe left or right to navigate through the UI. -I can successfully...
Read more >
How To: Adding swipe support to Bootstrap's Carousel - Laz ...
A quick and easy way to add swipe support to Bootstrap's Carousel or any other ... mobile swipe right/left events to the carousel...
Read more >
How can I avoid conflicting swipe gestures if there is a ... - MSDN
I have a CarouselPage with two ContentPage children. The right one has a ListView with SwipeView items, I want to access by a...
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