React Native MarqueeLabel (remobile)
A marquee label for react-native
- if you use js pure marquee, use remobile/react-native-marquee[ https://github.com/remobile/react-native-marquee ]
Installation
npm install @remobile/react-native-marquee-label --save
Installation (iOS)
- Drag RCTMarqueeLabel.xcodeproj to your project on Xcode.
- Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTMarqueeLabel.a from the Products folder inside the RCTMarqueeLabel.xcodeproj.
- Look for Header Search Paths and make sure it contains both $(SRCROOT)/../../../react-native/React as recursive.
Installation (Android)
...include ':react-native-marquee-label'project(':react-native-marquee-label').projectDir = new File(settingsDir, '../node_modules/@remobile/react-native-marquee-label/android/RCTMarqueeLabel')
- In
android/app/build.gradle
...dependencies { ... compile project(':react-native-marquee-label')}
- register module (in MainApplication.java)
...... // <--- import ...... @Overrideprotected List<ReactPackage> { ...... new RCTMarqueeLabelPackage(), // <------ add here ......}
Usage
Example
'use strict'; var React = ;var ReactNative = ;var StyleSheet View = ReactNative; var MarqueeLabel = ; moduleexports = React; var styles = StyleSheet;
Screencasts
Props
text : PropTypes.string.isRequired
scrollDuration : PropTypes.number
//secondsmarqueeType : PropTypes.string
//iosfadeLength : PropTypes.number
//iosleadingBuffer : PropTypes.number
//iostrailingBuffer : PropTypes.number
//iosisRepeat : PropTypes.bool
//androidstartPoint : PropTypes.number
//androiddirection : PropTypes.number
//android