A view component to render chinese characters. Currently supports stroke order animations. Quiz functionality coming soon.
Huge shout out to @skishore for his awesome work on https://github.com/skishore/makemeahanzi! This project would not be possible without his stroke order data.
$ npm install react-native-character-view --save
$ react-native link react-native-character-view
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-character-view
and addRNCharacterView.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNCharacterView.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNCharacterViewPackage;
to the imports at the top of the file - Add
new RNCharacterViewPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-character-view' project(':react-native-character-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-character-view/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-character-view')
- In Visual Studio add the
RNCharacterView.sln
innode_modules/react-native-character-view/windows/RNCharacterView.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Cl.Json.RNCharacterView;
to the usings at the top of the file - Add
new RNCharacterViewPackage()
to theList<IReactPackage>
returned by thePackages
method
import RNCharacterView from 'react-native-character-view';
import { NativeModules } from 'react-native'
// This will be hidden in future releases
const CharacterViewManager = NativeModules.RNCharacterViewManager;
render() {
<CharacterView
character={character}
ref="characterView"
style={{flex: 1}}
/>
}
Animate the strokes by calling
CharacterViewManager.animateStrokes();
##License
GNU