React-Native-ViewPager inside StackNavigator
Closed this issue ยท 1 comments
Amir-P commented
I'm using React-Native-ViewPager with ReactNavigation and I wrapped my component inside a StackNavigator. Everything is fine but when I'm trying to scroll back on iOS if I'm on other pages than first page, the previous page appears on behind the component. here is my dependencies
"react": "16.3.1",
"react-native": "0.55.4",
"rn-viewpager": "^1.2.9"
"react-navigation": "^2.0.1",
and here is my JSX code
<View style={{flex: 1}}>
<IndicatorViewPager
style={{
removeClippedSubviews: 'false',
flex: 1,
flexDirection: 'column-reverse',
backgroundColor: 'white',
width: Dimensions.get('window').width,
}}
removeClippedSubviews={false}
indicator={this._renderTabIndicator()}>
<View style={{overflow: 'hidden', backgroundColor: 'cadetblue'}}>
<Text>page one</Text>
</View>
<View style={{overflow: 'hidden', backgroundColor: 'cornflowerblue'}}>
<Text>page two</Text>
</View>
<View style={{overflow: 'hidden', backgroundColor: '#1AA094'}}>
<Text>page three</Text>
</View>
</IndicatorViewPager>
</View>
smn729 commented
try this style at your container: {overflow: "hidden"}