我正在使用rn-viewpager
我想要一个这样的观点:
但我得到的是这样的:
这是我的代码:
<IndicatorViewPager
style={{flex:1,width:60}}
onPageSelected={(position) => this.onChangeRound(position)}
>
<View>
<Image style={{marginLeft:40,justifyContent:'center',
resizeMode:'center'}}
source={this.state.firstRound}
/>
</View >
<View>
<Image style={{marginLeft:40,justifyContent:'center',
resizeMode:'center' }}
source={this.state.secondRound}
/>
</View >
<View>
<Image style={{marginLeft:40,justifyContent:'center',
resizeMode:'center' }}
source={this.state.thirdRound}
/>
</View>
<View>
<Image style={{marginLeft:40,justifyContent:'center',
resizeMode:'center' }}
source={this.state.fourthRound}
/>
</View>
<View>
<Image style={{marginLeft:40,justifyContent:'center',
resizeMode:'center' }}
source={this.state.fifthRound}
/>
</View>
</IndicatorViewPager>
请忽略'SCROLL'文字。
我想在我的屏幕上一次显示两个图像,一个是活动的,一个是非活动的,滚动时它应该改变。这里一切都正常,除了(一个屏幕上有2张图片)