React native 更改开关左/右按钮';s位置反应为本机
我正在使用React native Swiper,我想从以下位置更改左/右按钮的位置: 为此: 只有按钮而不是点,我的代码如下所示:React native 更改开关左/右按钮';s位置反应为本机,react-native,React Native,我正在使用React native Swiper,我想从以下位置更改左/右按钮的位置: 为此: 只有按钮而不是点,我的代码如下所示: <Swiper showsButtons={true} paginationStyle={{bottom: undefined, left: undefined, top:35, right:"47%"}}> <View> . . . </View> </Swiper . . . 坏方法 在r
<Swiper showsButtons={true} paginationStyle={{bottom: undefined, left: undefined, top:35, right:"47%"}}>
<View>
.
.
.
</View>
</Swiper
.
.
.
坏方法
在react native swiper/src/index.js中
buttonWrapper: {
backgroundColor: 'transparent',
flexDirection: 'row',
position: 'absolute',
top: 0,
left: 0,
flex: 1,
paddingHorizontal: 10,
paddingVertical: 10,
justifyContent: 'space-between',
alignItems: 'center'
},
通过以下方式更改按钮样式:
buttonWrapper: {
backgroundColor: 'transparent',
flexDirection: 'row',
position: 'absolute',
top: 0,
left: 0,
flex: 1,
paddingHorizontal: 10,
paddingVertical: 10,
justifyContent: 'space-between',
alignItems: 'flex-start'
},
你想怎么调整就怎么调整
编辑:好方法
我刚看到你可以使用纽扣式吊杆
<Swiper buttonWrapperStyle={{alignItems: 'flex-start'}} showsButtons={true} paginationStyle={{bottom: undefined, left: undefined, top:35, right:"47%"}}>
...
</Swiper>
...
坏方法
在react native swiper/src/index.js中
buttonWrapper: {
backgroundColor: 'transparent',
flexDirection: 'row',
position: 'absolute',
top: 0,
left: 0,
flex: 1,
paddingHorizontal: 10,
paddingVertical: 10,
justifyContent: 'space-between',
alignItems: 'center'
},
通过以下方式更改按钮样式:
buttonWrapper: {
backgroundColor: 'transparent',
flexDirection: 'row',
position: 'absolute',
top: 0,
left: 0,
flex: 1,
paddingHorizontal: 10,
paddingVertical: 10,
justifyContent: 'space-between',
alignItems: 'flex-start'
},
你想怎么调整就怎么调整
编辑:好方法
我刚看到你可以使用纽扣式吊杆
<Swiper buttonWrapperStyle={{alignItems: 'flex-start'}} showsButtons={true} paginationStyle={{bottom: undefined, left: undefined, top:35, right:"47%"}}>
...
</Swiper>
...
谢谢您的帮助,先生!它起作用了,但它改变了我应用程序上的所有开关,我只想在其中一个上更改它,我尝试将ButtonRapper添加到,但它不起作用我用很好的方法编辑了我的答案,解决了你的问题完美这就是我要找的谢谢你先生的帮助!它起作用了,但它改变了我应用程序上的所有开关,我只想在其中一个上进行更改,我尝试将ButtonRapper添加到,但它不起作用我用很好的方式编辑了我的答案,解决了你的问题完美这就是我要找的