如何为RN Carousel中的文本设置动画,例如“ react-native-text-ticker”中的TextTicker或“ react-native-marquee”中的MarqueeText? 我试图在“轮播”中添加一个TextTicker,但它不起作用吗?...
render() {
return (
<View>
<Carousel
ref={(c) => { this._carousel = c; }}
renderItem={this._renderCarouselItem.bind(this)}
sliderWidth={'100'}
itemWidth={'100'}
/>
</View>
);
}
_renderCarouselItem ({item, index}) {
return (
<View>
<TextTicker
style={{ fontSize: 24 }}
duration={3000}
loop
bounce
repeatSpacer={50}
marqueeDelay={1000}
>
Super long piece of text is long. The quick brown fox jumps over the lazy dog.
</TextTicker>
</View>
);
}