Skip to content

OrangeFlavoredColdCoffee/react-native-carousel-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-carousel-text

A React Native module for vertical scroll text Ads 垂直滚动的文字组件(滚动广告)

img

Setup Install the package:

npm install react-native-carousel-text

Usage example

import ScrollVertical from 'react-native-carousel-text';

                       <ScrollVertical
                         onChange={((index) => {
                           this.index = index;
                         })}
                         enableAnimation
                         delay={2000}
                         duration={500}
                         scrollHeight={45}
                       >
                         <TouchableOpacity
                           style={[
                             {
                               justifyContent: 'center',
                               height: 45,
                               alignItems: 'flex-start',
                               marginLeft: 15,
                             }]} onPress={() => Alert.alert('11')}
                         >
                           <Text style={{color: '#ff00ff'}}>广告1</Text>
                         </TouchableOpacity>
                         <TouchableOpacity
                           style={[
                             {
                               justifyContent: 'center',
                               height: 45,
                               alignItems: 'flex-start', marginLeft: 15,
                             }]}
                           onPress={() => Alert.alert('11')}
               
                         >
                           <Text>广告2</Text>
                         </TouchableOpacity>
                         <TouchableOpacity
                           style={[
                             {
                               justifyContent: 'center',
                               height: 45,
                               alignItems: 'flex-start', marginLeft: 15,
                             }]} onPress={() => Alert.alert('11')}
                         >
                           <Text>广告3</Text>
                         </TouchableOpacity>
                       </ScrollVertical>


About

vertical scroll text used for Ads

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published