Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我想做的
消息轮播示例
我可以用按钮发送消息,但我不知道如何组合组件以创建轮播。
我刚刚找到了解决方案。基本上你只需要修改你的renderBubble. 我通过一些道具告诉收到的消息是轮播。
renderBubble
我用于ScrollView我的外部容器和View每个块。
ScrollView
View
<ScrollView style={{ backgroundColor:'white', height: 200, }} horizontal={true}> <View> <View/> </ScrollView>
对于普通文本,只需返回Bubble
Bubble
<Bubble {...props} />