我将React Native与NativeBase结合使用,如下所示:
https://snack.expo.io/@deltanovember/tab-swipe
我正在尝试实现Advanced Deck Swiper:
http://docs.nativebase.io/Components.html#deckswiper-adv-headref
我的代码与示例几乎相同,但我的前进图标与按钮的左侧对齐:

而根据示例,它应该与按钮的右侧对齐:

如何使对齐与示例匹配(即按钮右侧的图标?)
发布于 2018-12-17 00:20:49
这个问题是因为您没有设置<Body />标签的样式
这应该可以正常工作
并尝试在项目中的任何位置使用样式
这是您的右按钮:
<Button
iconRight
onPress={() => this._deckSwiper._root.swipeRight()}>
<View style={{ flexDirection: 'row-reverse' }} >
<Icon name="ios-arrow-forward" />
<Text>Swipe Right</Text>
</View>
</Button>也许只需切换图标和文本就可以解决这个问题,但最好是常规的:)
(祝你好运,这是我白天给你的第二个答案:DDDD )
发布于 2018-12-16 22:36:26
您放置图标和文本的顺序不正确。我只是交换了它们,它起作用了:
<Text>Swipe Right</Text>
<Icon name="ios-arrow-forward" />https://stackoverflow.com/questions/53802053
复制相似问题