0.0.1 • Published 8 years ago

react-native-danmaku v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

#Danmaku React Native SDK ##Installation

Run npm install react-native-danmaku --save

###Android

android/settings.gradle

include ':react-native-danmaku'
project(':react-native-danmaku').projectDir = new File(settingsDir, '../node_modules/react-native-danmaku/android')

android/app/build.gradle

dependencies {
    ...
    compile project(':react-native-danmaku')
}

MainActivity.java

On top, where imports are:

import com.danmaku.rndanmaku.DanmakuPackage;

Modify getPackages method

 @Override
    protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
                new MainReactPackage(),
                new DanmakuPackage()
        );
    }

##Usage

import Danmaku from 'react-native-danmaku'
<Danmaku style={}></Danmaku>