问题描述
我使用“ react-native-snap-carousel”
但是,如您所见,第三项位于活动项(中心项)的上方 我希望活动项目位于其他项目之上。
你们能帮我解决这个问题吗? 还是有任何软件包可以执行此用户界面
这是我的代码
<Carousel
ref={(c) => {
this._carousel = c;
}}
firstItem={2}
inactiveSlideOpacity={1.0}
inactiveSlideScale={0.8}
activeSlideOffset={0}
hasParallaxImages={true}
data={[{},{},{}]}
renderItem={({item,index}) => {
return (
<View
style={{
width: 200,height: ((width * 0.4 * 14) / 25) * 1.2,overflow: 'hidden',borderWidth: 1,}}>
<Text style={{}}>Hello guys</Text>
<Image
source={{
uri:
'https://i.ytimg.com/vi/HF48Ur2dbMM/maxresdefault.jpg',}}
style={{flex: 1}}
/>
</View>
);
}}
sliderWidth={700}
itemWidth={200 * 0.8}
/>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)