Open sagardesai16 opened 5 years ago
Hi There,
I want to customise renderHeader prop by passing carousel component. renderHeader={() => <View style={{width: '100%', height:'100%', backgroundColor:'#2E343D'}}> <Carousel ref={(c) => { this._carousel = c; }} data={this.state.entries} renderItem={this._renderItem} sliderWidth={Dimensions.get('window').width} itemWidth={Dimensions.get('window').width} onSnapToItem={(index) => this.setState({ activeSlide: index }) } /> </View>}
renderHeader={() => <View style={{width: '100%', height:'100%', backgroundColor:'#2E343D'}}> <Carousel ref={(c) => { this._carousel = c; }} data={this.state.entries} renderItem={this._renderItem} sliderWidth={Dimensions.get('window').width} itemWidth={Dimensions.get('window').width} onSnapToItem={(index) => this.setState({ activeSlide: index }) } /> </View>}
But the horizontal scroll doesn't work in it. However if pass the same carousel component in renderForeground prop then it works.
Could you please advice on it?
+1
Any success?
I have also put a carousel in renderForeground, what I can not do is the effect of bounce and image enlargement when you pull the scroll down... Any idea how to do it?
Hi There,
I want to customise renderHeader prop by passing carousel component.
renderHeader={() => <View style={{width: '100%', height:'100%', backgroundColor:'#2E343D'}}> <Carousel ref={(c) => { this._carousel = c; }} data={this.state.entries} renderItem={this._renderItem} sliderWidth={Dimensions.get('window').width} itemWidth={Dimensions.get('window').width} onSnapToItem={(index) => this.setState({ activeSlide: index }) } /> </View>}
But the horizontal scroll doesn't work in it. However if pass the same carousel component in renderForeground prop then it works.
Could you please advice on it?