Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animateToPage and _animatePreviousPage not working in ScrollView #228

Open
Msspl-PrashenjeetRoy opened this issue Aug 9, 2018 · 1 comment

Comments

@Msspl-PrashenjeetRoy
Copy link

Msspl-PrashenjeetRoy commented Aug 9, 2018

animateToPage and _animatePreviousPage not working in ScrollView in iPhone 6Plus and iPhone 7.

<Carousel
          delay             = {2000}
          style             = {this.state.size}
          autoplay          = {false}
          isLooped          = {false}
          pageInfo          = {false}
          bullets           = {true}
          bulletStyle       = {{backgroundColor:'#BFBFBF', borderWidth:0}}
          chosenBulletStyle = {{backgroundColor:'#717171', borderWidth:0}}
          onAnimateNextPage = {(p) => console.log(p)}
          currentPage       = {this.state.currentPageNo}
          ref               = {(ref) => { this._carousel = ref; }}>
              <View style={[{ backgroundColor: '#BADA55', paddingTop:50 }, this.state.size]}>
                <Text>1</Text><Text onPress={() => {this._carousel._animateNextPage()}}>onpress</Text>
              </View>
              <View style={[{ backgroundColor: 'red', paddingTop:50 }, this.state.size]}>
                <Text>22</Text><Text onPress={() => {this._carousel._animatePreviousPage()}}>onpress-Prev</Text>
                <ScrollView style={{flex:1, backgroundColor: 'yellow'}}>
                  <Text>21</Text><Text onPress={() => {this._carousel._animatePreviousPage()}}>onpress-in-between</Text>
                </ScrollView>
              </View>
              <View style={[{ backgroundColor: 'blue', paddingTop:50 }, this.state.size]}>
                <Text>3</Text><Text onPress={() => {this._carousel.animateToPage(0)}}>onpress</Text>
              </View>
     </Carousel>

When we put page content in between ScrollView and call that function from there then the function is not working in the release build, but in debug build it's working fine.

Can anyone please suggest any solution how to solve the problem?? We need it urgently because we are implementing it in the live project.

@MSSPL-PiyaleeMaiti
Copy link

Is there any solution for above problem?
We are stuck here for that issue. Need any solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants