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 loop stop at last item while scroll

See original GitHub issue

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

a bug report

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?

no

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

not sure , only tested in android

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

yes

Environment

Environment: React: 16.8.3 React native: 0.59.8 react-native-snap-carousel: 3.8.0

Target Platform: Android (8.1/9.0)

Expected Behavior

loop all the way

Actual Behavior

https://youtu.be/hp_bmguntpU

Reproducible Demo

https://snack.expo.io/H1C69zzRV

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:29 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
hejun041commented, Jun 28, 2019

When I use phone ,it works ,but not works in emulator

2reactions
saigyouyoucommented, Jun 25, 2019

Same issue too.

When scroll to left, it works well. However, when scroll to right, it encounts an end and doesn’t scroll any more.

May be there is a problem when check whether it encounts the end or start.

My code is like below

      <Carousel
            data={this.state.items}
            keyExtractor = { (item, index) => index.toString() }
            renderItem={({item, index})=> {
                   this._renderItem(item, index)
             }} 
            loop={true}
            loopClonesPerSide = {4}
            autoplay = {true}
            autoplayInterval = {8000}
            horizontal ={ true }
            sliderWidth={ width }
            itemWidth  ={ slideWidth + paddingX }
            activeSlideAlignment={'start'}
            layout={'default'}
            enableEmptySections = {false}
            showsHorizontalScrollIndicator = {false}
            showsVerticalScrollIndicator={false}
            inactiveSlideScale = {1}
            inactiveSlideOpacity = {1}
            removeClippedSubviews={false}
            onSnapToItem={(index) => this.setState({ activeSlide: index }) }
      ></Carousel>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Android loop stop at last item while scroll · Issue #529 - GitHub
When scroll to left, it works well. However, when scroll to right, it encounts an end and doesn't scroll any more. May be...
Read more >
How to go past the last item in a recycle view when scrolling up
I have a recycleview that I like to go past the last element when I scroll up. The reason I need to do...
Read more >
ScrollView - Android Developers
Handles scrolling in response to a "home/end" shortcut press. ... Cause an invalidate to happen on a subsequent cycle through the event loop....
Read more >
How to infinite loop automatic carousel - JavaScript - SitePoint
I have an auto slide carousels which are not infinite loop. The problem is when a carousel reach the last image it stops...
Read more >
The Marquee element - HTML: HyperText Markup Language
Chrome Edge marquee. Deprecated Full support. Chrome1. Toggle history Full support. Edge12. Toggle... behavior. Deprecated Full support. Chrome1. Toggle history Full support. Edge12. Toggle... bgcolor. Deprecated...
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